Skip to content

Commit

Permalink
Fix failing Switch E2E tests (#22698)
Browse files Browse the repository at this point in the history
Summary:
Switch E2E tests have been failing on master, although they pass locally.

Changelog:
----------

Help reviewers and the release process by writing your own changelog entry. See http://facebook.github.io/react-native/docs/contributing#changelog for an example.

[General] [Fixed] - Fix failing Switch E2E tests
Pull Request resolved: #22698

Differential Revision: D13511917

Pulled By: hramos

fbshipit-source-id: b2f5cac1927531a855699e34e1a37036773f0aad
  • Loading branch information
CodingItWrong authored and grabbou committed Jan 3, 2019
1 parent 1c22c10 commit 68f6325
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions RNTester/e2e/__tests__/Switch-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@
const jestExpect = require('expect');

describe('Switch', () => {
beforeAll(async () => {
beforeEach(async () => {
await device.reloadReactNative();
await element(by.id('explorer_search')).replaceText('<Switch>');
await element(by.label('<Switch> Native boolean input')).tap();
});

afterAll(async () => {
await element(by.label('Back')).tap();
});

it('Switch that starts on should switch', async () => {
it('Switch that starts off should switch', async () => {
const testID = 'on-off-initial-off';
const indicatorID = 'on-off-initial-off-indicator';

Expand All @@ -34,7 +30,7 @@ describe('Switch', () => {
await expect(element(by.id(indicatorID))).toHaveText('On');
});

it('Switch that starts off should switch', async () => {
it('Switch that starts on should switch', async () => {
const testID = 'on-off-initial-on';
const indicatorID = 'on-off-initial-on-indicator';

Expand Down

0 comments on commit 68f6325

Please sign in to comment.