mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 06:38:13 +00:00
Summary: Fixes lots of ESLint warnings. Many of them where in PR #20877 by janicduplessis which requested to split the linting fixes from configuration and package changes. I solved only the issues that I was most certain about but I would love to get hands on all of them with a little bit of input. Pull Request resolved: https://github.com/facebook/react-native/pull/22062 Differential Revision: D12889447 Pulled By: TheSavior fbshipit-source-id: 35f7a08104a5b859c860afdde4af2b32c0685c50
48 lines
1.6 KiB
JavaScript
48 lines
1.6 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
/* global device, element, by, expect */
|
|
|
|
describe('Sanity', () => {
|
|
beforeEach(async () => {
|
|
await device.reloadReactNative();
|
|
await element(by.label('<Button> Simple React Native button component.')).tap();
|
|
});
|
|
|
|
afterEach(async () => {
|
|
//TODO - remove app state persistency, till then, we must go back to main screen,
|
|
await element(by.label('Back')).tap();
|
|
});
|
|
|
|
it('Simple button should be tappable', async () => {
|
|
await element(by.label('Press Me')).tap();
|
|
await expect(element(by.text('Simple has been pressed!'))).toBeVisible();
|
|
await element(by.text('OK')).tap();
|
|
});
|
|
|
|
it('Adjusted color button should be tappable', async () => {
|
|
await element(by.label('Press Purple')).tap();
|
|
await expect(element(by.text('Purple has been pressed!'))).toBeVisible();
|
|
await element(by.text('OK')).tap();
|
|
});
|
|
|
|
it("Two buttons with JustifyContent:'space-between' should be tappable", async () => {
|
|
await element(by.label('This looks great!')).tap();
|
|
await expect(element(by.text('Left has been pressed!'))).toBeVisible();
|
|
await element(by.text('OK')).tap();
|
|
|
|
await element(by.label('Ok!')).tap();
|
|
await expect(element(by.text('Right has been pressed!'))).toBeVisible();
|
|
await element(by.text('OK')).tap();
|
|
});
|
|
|
|
it('Disabled button should not interact', async () => {
|
|
await element(by.label('I Am Disabled')).tap();
|
|
await expect(element(by.text('Disabled has been pressed!'))).toBeNotVisible();
|
|
});
|
|
});
|