Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
Merge pull request #211 from ES2-UFPI/jpe#aboutScreenTest
Browse files Browse the repository at this point in the history
Criado teste para tela de Sobre
  • Loading branch information
Mex978 authored Jun 18, 2019
2 parents 1b615d5 + 850b32d commit a74bae6
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions __tests__/aboutScreen.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from "react"
import { View, Text, TouchableOpacity, ScrollView, Image } from "react-native"
import { shallow } from "enzyme"
import About from "~/Screens/About/about"
import AboutHeader from "~/Components/About/aboutHeader"

describe("rendering", () => {
let wrapper
beforeEach(() => {
wrapper = shallow(<About />)
})

it("should render 5 text components", () => {
expect(wrapper.find(Text)).toHaveLength(5)
})
it("should render 3 views components", () => {
expect(wrapper.find(View)).toHaveLength(3)
})
it("should render 1 scrollview component", () => {
expect(wrapper.find(ScrollView)).toHaveLength(1)
})
it("should render 1 touchableopacity component", () => {
expect(wrapper.find(TouchableOpacity)).toHaveLength(1)
})
it("should render 1 image component", () => {
expect(wrapper.find(Image)).toHaveLength(1)
})
it("should render AboutHeader component", () => {
expect(wrapper.find(AboutHeader)).toHaveLength(1)
})
})

0 comments on commit a74bae6

Please sign in to comment.