From 1c22c10aa2fbcc3fae623de25c7693424a96dce7 Mon Sep 17 00:00:00 2001 From: Josh Justice Date: Mon, 10 Dec 2018 21:31:19 -0800 Subject: [PATCH] Remove persistence from RNTester app (#22596) Summary: Previously the RNTester app saved what screen you were on and what filter text was entered into the initial screen. This made e2e testing complex, as each test needed to manually restore the state to the home screen. If the state ever got out of sync with the test's expectations, it could lead to multiple failed tests. There is still one specific component that uses persistence: `RNTesterSettingSwitchRow`. Persistence can be removed from this component next time tests for it are updated. As a result, `RNTesterStatePersister` is not yet entirely removed from the app. Pull Request resolved: https://github.com/facebook/react-native/pull/22596 Differential Revision: D13413457 Pulled By: cpojer fbshipit-source-id: 3faa26a94139397b4bce6b62ff43e9c2f870b145 --- RNTester/e2e/__tests__/Button-test.js | 3 ++- RNTester/e2e/__tests__/Switch-test.js | 3 ++- RNTester/js/RNTesterApp.ios.js | 13 ++----------- RNTester/js/RNTesterExampleList.js | 25 ++++++------------------- 4 files changed, 12 insertions(+), 32 deletions(-) diff --git a/RNTester/e2e/__tests__/Button-test.js b/RNTester/e2e/__tests__/Button-test.js index 47e211ab790..2d5a573f043 100644 --- a/RNTester/e2e/__tests__/Button-test.js +++ b/RNTester/e2e/__tests__/Button-test.js @@ -8,10 +8,11 @@ * @format */ -/* global element, by, expect */ +/* global device, element, by, expect */ describe('Button', () => { beforeAll(async () => { + await device.reloadReactNative(); await element(by.id('explorer_search')).replaceText('