This repository has been archived by the owner on Jun 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from ES2-UFPI/jpe#aboutScreenTest
Criado teste para tela de Sobre
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) | ||
}) |