Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Mike Grabowski 8270de9c2c Fix DatePickerIOS e2e tests (#23861)
Summary:
DatePickerIOS tests stopped working after US changed their time zone on CircleCI. I decided to update the tests to be more reliable, by:
- removing "timezoneoffset" from the examples - I don't think it's needed. We don't demonstrate other props and it was causing us some troubles when timezones actually changed
- changing "interval" example from "time-only" to "datetime" because there's a known bug that prevented the previous example from working https://github.com/facebook/react-native/issues/9566
- splitting the label to two: one for date and other one for time, so that we can match the date only when we test "date" mode only

[IOS] [FIXED] - Improved reliability of DatePickerIOS e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/23861

Differential Revision: D14434324

Pulled By: cpojer

fbshipit-source-id: 0f82b7e94bb1cb6ce75b44badd0064d1754370b9
2019-03-12 18:35:02 -07:00
Héctor Ramos 8721ef0916 Kill Switch tests (#23753)
Summary:
This component is being extracted.

These are flaky and constantly fail on Circle.

[General] [Removed] - Removed Detox e2e Switch tests
Pull Request resolved: https://github.com/facebook/react-native/pull/23753

Differential Revision: D14319130

Pulled By: cpojer

fbshipit-source-id: d0ea276440e034afbb11aa31762922532ad06402
2019-03-04 18:38:50 -08:00
Héctor Ramos 05c56edf41 Remove flaky Switch e2e test (#23410)
Summary:
'Switch that starts on should switch' appears to be flaky, as it has failed on seemingly unrelated commits, only to succeed on the next CI run. `Switch` is scheduled to be removed from the core repository anyway, so I'm removing this test to ensure we get a clear signal for the rest of the repository.

[GENERAL] [Changed] - Tests: Removed flaky Switch e2e test.
Pull Request resolved: https://github.com/facebook/react-native/pull/23410

Differential Revision: D14057068

Pulled By: cpojer

fbshipit-source-id: dc7bc74c3d23ec3856107fec4ee9fa388adce2e5
2019-02-12 14:53:22 -08:00
Rick Hanlon 34ee8250b5 Add filtering to e2e tests (#22828)
Summary:
This PR adds filtering for e2e test examples using the new examples filter introduced in https://github.com/facebook/react-native/pull/22777

To do that we:
- Add a `testID` to `RNTesterExampleFilter` to select an example
- Refactor a few examples to export multiple examples for filtering
- Update all tests to filter by example title
Pull Request resolved: https://github.com/facebook/react-native/pull/22828

Reviewed By: TheSavior

Differential Revision: D13562664

Pulled By: rickhanlonii

fbshipit-source-id: efb0ca8050c1ca5c10d96bd77d35dd1143c3a3b3
2018-12-31 04:33:49 -08:00
Josh Justice bb09866cba Fix failing Switch E2E tests (#22698)
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: https://github.com/facebook/react-native/pull/22698

Differential Revision: D13511917

Pulled By: hramos

fbshipit-source-id: b2f5cac1927531a855699e34e1a37036773f0aad
2018-12-18 16:00:35 -08:00
Josh Justice ac30f64ae5 Fix E2E warnings (#22621)
Summary:
Fixes two types of warnings that occur when running E2E tests:

1. A deprecation warning from Jest: 'Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.'
2. YellowBox warnings when running the app in debug mode, about components that are deprecated and that require main queue setup.

By fixing these warnings, we increase contributors' confidence that things are working correctly, and draw attention to any warnings that they _should_ pay attention to, if and when they arise.

I feel confident that we should hide the deprecated-component warnings; we _want_ to use these components because we want them to be tested, until they're removed entirely.

For the warning "Module RCTImagePickerManager requires main queue setup", if that's something that can be fixed with reasonable effort in the RNTester code then I think it would be better to do so. Otherwise, I think it is good to hide the warning, because this is a condition we expect: it's not something a contributor should pay attention to.
Pull Request resolved: https://github.com/facebook/react-native/pull/22621

Differential Revision: D13468553

Pulled By: hramos

fbshipit-source-id: 1a5952087dd6fcc9ba08ff7a60ad9f5b075bef57
2018-12-14 12:45:24 -08:00
Josh Justice 33fb70f6b6 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
2018-12-10 21:36:52 -08:00
Josh Justice 9cd6ae2f4b Updated Button e2e tests to look up elements via testID (#22593)
Summary:
Previously the e2e test for Butto looked up elements by label. This can be fragile, and based on my understanding from TheSavior we would prefer to use testIDs. This also sets a consistent pattern we can point future contributors to, to follow.

Note that we are still looking up elements in the alerts shown by label. I haven't yet looked into whether it would be possible to add testIDs to alerts; it might be too complex to be worth it.
Pull Request resolved: https://github.com/facebook/react-native/pull/22593

Differential Revision: D13410799

Pulled By: TheSavior

fbshipit-source-id: 4bda80f4b8e7fe3ef17cd33209ec86d9183fd5e9
2018-12-10 17:54:23 -08:00
Josh Justice 1bc704d4c7 Add Touchable E2E tests (#22570)
Summary:
Adds some initial tests for Touchable*. It only tests the first screen worth of examples; in a separate PR I'll work on an alternate way to "scroll" to individual examples in tests, before I add tests for the rest of the Touchable examples.

On the live stream where I began writing these tests, I reorganized the "Touchable feedback examples" to the top of the list so it would be on-screen for testing. I didn't include this reorganization or test in this PR; that can be added in once the "alternative to scrolling" is added in, to avoid having to reorganize.

Changelog:
----------
[General] [Added] - Add E2E tests for Touchable
Pull Request resolved: https://github.com/facebook/react-native/pull/22570

Differential Revision: D13400348

Pulled By: TheSavior

fbshipit-source-id: 821af135296049090427a16472cc14dabeb10ab4
2018-12-10 10:58:15 -08:00
Rick Hanlon 9fdbf6029e Add e2e tests, bug fixes for testIDs (#22537)
Summary:
This PR adds e2e tests for the Picker and DatePicker components.

While writing these tests, I also found and fixed two bugs where we wern't passing the `testID` down to the native components, so detox couldn't look them up. This confirms what was mentioned by rotemmiz [here](https://github.com/wix/Detox/issues/798#issuecomment-401412276)
Pull Request resolved: https://github.com/facebook/react-native/pull/22537

Reviewed By: cpojer

Differential Revision: D13371307

Pulled By: rickhanlonii

fbshipit-source-id: a4dfcdb5913645bceca0c7353328eeb9ad0f6558
2018-12-07 14:54:42 -08:00
Eli White 4dea677b4f Add detox tests for Switch (#22470)
Summary:
Reorganized some of the switch examples to be more testable:

Before:
![simulator screen shot - iphone xs - 2018-12-01 at 02 27 47](https://user-images.githubusercontent.com/249164/49327066-bcc35580-f510-11e8-860d-fc07a574f80c.png)

After:
![simulator screen shot - iphone xs - 2018-12-01 at 02 27 06](https://user-images.githubusercontent.com/249164/49327068-bf25af80-f510-11e8-95c6-7aa4a9095b91.png)

Tests pass!

```
yarn build-ios-e2e && yarn test-ios-e2e
```
<img width="711" alt="screen shot 2018-12-01 at 2 20 33 am" src="https://user-images.githubusercontent.com/249164/49327070-c64cbd80-f510-11e8-8cad-84c3fe42941e.png">

Changelog:
----------
Help reviewers and the release process by writing your own changelog entry. When the change doesn't impact React Native developers, it may be ommitted from the changelog for brevity. See below for an example.

[Internal] [Added] - Detox tests for Switch
Pull Request resolved: https://github.com/facebook/react-native/pull/22470

Reviewed By: RSNara

Differential Revision: D13290329

Pulled By: TheSavior

fbshipit-source-id: 91c1b895dd5e1acc4330618e6d3165c7f9215997
2018-12-05 12:59:04 -08:00
Eli White 3749da1312 Make RNTester build and pass again (#22468)
Summary:
Detox was failing because of build errors due to the new xcode10 build system. These errors were fixed by RSNara in b7349f9857 but this callsite was missed.
Pull Request resolved: https://github.com/facebook/react-native/pull/22468

Reviewed By: RSNara

Differential Revision: D13287386

Pulled By: TheSavior

fbshipit-source-id: 8a2df9801c69d851eabe7074ffc12b29c03a636a
2018-11-30 18:30:39 -08:00
Rubén Norte 2ae559a2a4 eslint: Disable jasmine env and only enable jest env for test files
Summary:
Modified the ESLint configuration to only enable the Jest environment for files we consider now tests, which are files with the `-test.js` suffix under `__tests__`. Also enabled some globals for test helpers (any file under `__tests__`).

This will allow us to catch misspelled tests, while allowing test helpers to use most Jest APIs.

Also disabled the Jasmine environment so people stop using Jasmine APIs and we can rollout Circus soon.

Reviewed By: aaronabramov

Differential Revision: D13199591

fbshipit-source-id: 12a32cf5835630b9987452b0c33d3f8085001689
2018-11-27 03:51:02 -08:00
Ignacio Olaciregui ae8ec39397 Fix linting issues (#22062)
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
2018-11-01 14:29:16 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
Rotem M 7f0a4f72b4 Initial Detox E2E iOS configuration to be run on RNTester (#20235)
Summary:
This PR adds initial setup for Detox E2E iOS and some tests for ButtonExample.
Pull Request resolved: https://github.com/facebook/react-native/pull/20235

Reviewed By: hramos

Differential Revision: D8924525

Pulled By: TheSavior

fbshipit-source-id: 8117fc1559c2e9cb831f7b081aa8f4ddc8ba7401
2018-07-30 14:31:24 -07:00