From 2c3000df9c42f679f706c2682d16320da9858fca Mon Sep 17 00:00:00 2001 From: Marcelo Morgado Date: Tue, 18 Dec 2018 17:44:10 +0000 Subject: [PATCH 01/21] refs #22 --- demo/screens/EthereumQuestion.test.js | 15 +++++++ demo/screens/EthereumSignIn.test.js | 15 +++++++ demo/screens/EthereumSignUp.test.js | 15 +++++++ demo/screens/Home.test.js | 15 +++++++ demo/screens/LandClaim.test.js | 16 +++++++ demo/screens/ListLands.test.js | 15 +++++++ demo/screens/OnboardingHome.test.js | 15 +++++++ .../EthereumQuestion.test.js.snap | 44 +++++++++++++++++++ .../__snapshots__/EthereumSignIn.test.js.snap | 31 +++++++++++++ .../__snapshots__/EthereumSignUp.test.js.snap | 22 ++++++++++ demo/screens/__snapshots__/Home.test.js.snap | 25 +++++++++++ .../__snapshots__/LandClaim.test.js.snap | 29 ++++++++++++ .../__snapshots__/ListLands.test.js.snap | 14 ++++++ .../__snapshots__/OnboardingHome.test.js.snap | 34 ++++++++++++++ 14 files changed, 305 insertions(+) create mode 100644 demo/screens/EthereumQuestion.test.js create mode 100644 demo/screens/EthereumSignIn.test.js create mode 100644 demo/screens/EthereumSignUp.test.js create mode 100644 demo/screens/Home.test.js create mode 100644 demo/screens/LandClaim.test.js create mode 100644 demo/screens/ListLands.test.js create mode 100644 demo/screens/OnboardingHome.test.js create mode 100644 demo/screens/__snapshots__/EthereumQuestion.test.js.snap create mode 100644 demo/screens/__snapshots__/EthereumSignIn.test.js.snap create mode 100644 demo/screens/__snapshots__/EthereumSignUp.test.js.snap create mode 100644 demo/screens/__snapshots__/Home.test.js.snap create mode 100644 demo/screens/__snapshots__/LandClaim.test.js.snap create mode 100644 demo/screens/__snapshots__/ListLands.test.js.snap create mode 100644 demo/screens/__snapshots__/OnboardingHome.test.js.snap diff --git a/demo/screens/EthereumQuestion.test.js b/demo/screens/EthereumQuestion.test.js new file mode 100644 index 00000000..60048c15 --- /dev/null +++ b/demo/screens/EthereumQuestion.test.js @@ -0,0 +1,15 @@ +import React from "react"; +import NavigationTestUtils from "react-navigation/NavigationTestUtils"; +import { shallow } from "enzyme"; +import EthereumQuestion from "./EthereumQuestion"; + +describe("EthereumQuestion", () => { + jest.useFakeTimers(); + beforeEach(() => { + NavigationTestUtils.resetInternalState(); + }); + + it("renders the component", async () => { + expect(shallow()).toMatchSnapshot(); + }); +}); diff --git a/demo/screens/EthereumSignIn.test.js b/demo/screens/EthereumSignIn.test.js new file mode 100644 index 00000000..1ebb3f73 --- /dev/null +++ b/demo/screens/EthereumSignIn.test.js @@ -0,0 +1,15 @@ +import React from "react"; +import NavigationTestUtils from "react-navigation/NavigationTestUtils"; +import { shallow } from "enzyme"; +import EthereumSignIn from "./EthereumSignIn"; + +describe("EthereumSignIn", () => { + jest.useFakeTimers(); + beforeEach(() => { + NavigationTestUtils.resetInternalState(); + }); + + it("renders the component", async () => { + expect(shallow()).toMatchSnapshot(); + }); +}); diff --git a/demo/screens/EthereumSignUp.test.js b/demo/screens/EthereumSignUp.test.js new file mode 100644 index 00000000..16a4ac71 --- /dev/null +++ b/demo/screens/EthereumSignUp.test.js @@ -0,0 +1,15 @@ +import React from "react"; +import NavigationTestUtils from "react-navigation/NavigationTestUtils"; +import { shallow } from "enzyme"; +import EthereumSignUp from "./EthereumSignUp"; + +describe("EthereumSignUp", () => { + jest.useFakeTimers(); + beforeEach(() => { + NavigationTestUtils.resetInternalState(); + }); + + it("renders the component", async () => { + expect(shallow()).toMatchSnapshot(); + }); +}); diff --git a/demo/screens/Home.test.js b/demo/screens/Home.test.js new file mode 100644 index 00000000..70082bf0 --- /dev/null +++ b/demo/screens/Home.test.js @@ -0,0 +1,15 @@ +import React from "react"; +import NavigationTestUtils from "react-navigation/NavigationTestUtils"; +import { shallow } from "enzyme"; +import Home from "./Home"; + +describe("Home", () => { + jest.useFakeTimers(); + beforeEach(() => { + NavigationTestUtils.resetInternalState(); + }); + + it("renders the component", async () => { + expect(shallow()).toMatchSnapshot(); + }); +}); diff --git a/demo/screens/LandClaim.test.js b/demo/screens/LandClaim.test.js new file mode 100644 index 00000000..3d22d62b --- /dev/null +++ b/demo/screens/LandClaim.test.js @@ -0,0 +1,16 @@ +import React from "react"; +import NavigationTestUtils from "react-navigation/NavigationTestUtils"; +import { shallow } from "enzyme"; +import LandClaim from "./LandClaim"; + +describe("LandClaim", () => { + jest.useFakeTimers(); + beforeEach(() => { + NavigationTestUtils.resetInternalState(); + }); + + it("renders the component", async () => { + const navigation = { getParam: jest.fn() }; + expect(shallow()).toMatchSnapshot(); + }); +}); diff --git a/demo/screens/ListLands.test.js b/demo/screens/ListLands.test.js new file mode 100644 index 00000000..dada6211 --- /dev/null +++ b/demo/screens/ListLands.test.js @@ -0,0 +1,15 @@ +import React from "react"; +import NavigationTestUtils from "react-navigation/NavigationTestUtils"; +import { shallow } from "enzyme"; +import ListLands from "./ListLands"; + +describe("EthereumQuestion", () => { + jest.useFakeTimers(); + beforeEach(() => { + NavigationTestUtils.resetInternalState(); + }); + + it("renders the component", async () => { + expect(shallow()).toMatchSnapshot(); + }); +}); diff --git a/demo/screens/OnboardingHome.test.js b/demo/screens/OnboardingHome.test.js new file mode 100644 index 00000000..8dd5bf67 --- /dev/null +++ b/demo/screens/OnboardingHome.test.js @@ -0,0 +1,15 @@ +import React from "react"; +import NavigationTestUtils from "react-navigation/NavigationTestUtils"; +import { shallow } from "enzyme"; +import OnboardingHome from "./OnboardingHome"; + +describe("OnboardingHome", () => { + jest.useFakeTimers(); + beforeEach(() => { + NavigationTestUtils.resetInternalState(); + }); + + it("renders the component", async () => { + expect(shallow()).toMatchSnapshot(); + }); +}); diff --git a/demo/screens/__snapshots__/EthereumQuestion.test.js.snap b/demo/screens/__snapshots__/EthereumQuestion.test.js.snap new file mode 100644 index 00000000..614cbd75 --- /dev/null +++ b/demo/screens/__snapshots__/EthereumQuestion.test.js.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`EthereumQuestion renders the component 1`] = ` + + + Are you new to Ethereum? + + +