-
-
Notifications
You must be signed in to change notification settings - Fork 643
test(e2e,Fabric): add e2e tests for issue/PR examples 42..528 #2787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
91382db
create new test file
kligarski de0304e
check first 3 tests
kligarski c5ac5ec
check 349 and 364
kligarski da90f08
progress on Test432
kligarski 67c10c9
finish Test432
kligarski 3db0128
add tests for Test528
kligarski ed72b91
Update podfile lock
kkafar 2ed530f
rephrase descriptions
kligarski d2afd9a
change test-ids
kligarski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| import { device, expect, element, by } from 'detox'; | ||
|
|
||
| describe('Test432', () => { | ||
| beforeAll(async () => { | ||
| await device.reloadReactNative(); | ||
| }); | ||
|
|
||
| it('should Test432 exist', async () => { | ||
|
kligarski marked this conversation as resolved.
Outdated
|
||
| await waitFor(element(by.id('root-screen-tests-Test432'))) | ||
| .toBeVisible() | ||
| .whileElement(by.id('root-screen-examples-scrollview')) | ||
| .scroll(600, 'down', NaN, 0.85); | ||
|
|
||
| await expect(element(by.id('root-screen-tests-Test432'))).toBeVisible(); | ||
| await element(by.id('root-screen-tests-Test432')).tap(); | ||
| }); | ||
|
|
||
| it('home-square should be fully visible', async () => { | ||
|
kligarski marked this conversation as resolved.
Outdated
|
||
| await expect(element(by.id('home-square'))).toBeVisible(100); | ||
| }); | ||
|
|
||
| it('squares from details screen should be fully visible', async () => { | ||
|
kligarski marked this conversation as resolved.
Outdated
|
||
| await element(by.id('go-to-details')).tap(); | ||
| await expect(element(by.id('details-red-square'))).toBeVisible(100); | ||
|
|
||
| await element(by.id('details-toggle-subviews')).tap(); | ||
|
kligarski marked this conversation as resolved.
Outdated
|
||
| // On Android, we need to wait for some elements (e.g. at first, this square is only 25% visible) | ||
| waitFor(element(by.id('details-green-square'))).toBeVisible(100); | ||
|
|
||
| await element(by.id('details-toggle-subviews')).tap(); | ||
| await expect(element(by.id('details-red-square'))).toBeVisible(100); | ||
|
|
||
| if (device.getPlatform() === 'ios') { | ||
| await element(by.id('BackButton')).tap(); | ||
| } else { | ||
| await device.pressBack(); | ||
| } | ||
|
|
||
| await expect(element(by.id('home-square'))).toBeVisible(100); | ||
| }); | ||
|
|
||
| it('squares from info screen should be fully visible', async () => { | ||
| await element(by.id('go-to-info')).tap(); | ||
| await expect(element(by.id('info-green-square-1'))).toBeVisible(100); | ||
|
|
||
| await element(by.id('info-toggle-subviews')).tap(); | ||
| waitFor(element(by.id('info-green-square-1'))).toBeVisible(100); | ||
| waitFor(element(by.id('info-green-square-2'))).toBeVisible(100); | ||
| waitFor(element(by.id('info-red-square'))).toBeVisible(100); | ||
|
|
||
| await element(by.id('info-toggle-subviews')).tap(); | ||
| waitFor(element(by.id('info-green-square-1'))).toBeVisible(100); | ||
|
|
||
| if (device.getPlatform() === 'ios') { | ||
| await element(by.id('BackButton')).tap(); | ||
| } else { | ||
| await device.pressBack(); | ||
| } | ||
|
|
||
| await expect(element(by.id('home-square'))).toBeVisible(100); | ||
| }); | ||
|
|
||
| it('squares from settings screen should be fully visible', async () => { | ||
| await element(by.id('show-settings')).tap(); | ||
| await expect(element(by.id('settings-square'))).toBeVisible(100); | ||
|
|
||
| if (device.getPlatform() === 'ios') { | ||
| await element(by.id('settings-text')).swipe('down', 'fast'); | ||
| } else { | ||
| await device.pressBack(); | ||
| } | ||
| await expect(element(by.id('home-square'))).toBeVisible(100); | ||
| }); | ||
| }); | ||
|
|
||
| // Detox currently supports orientation only on iOS | ||
| if (device.getPlatform() === 'ios') { | ||
| describe('Test528', () => { | ||
| beforeAll(async () => { | ||
| await device.reloadReactNative(); | ||
| }); | ||
|
|
||
| it('should Test528 exist', async () => { | ||
| await waitFor(element(by.id('root-screen-tests-Test528'))) | ||
| .toBeVisible() | ||
| .whileElement(by.id('root-screen-examples-scrollview')) | ||
| .scroll(600, 'down', NaN, 0.85); | ||
|
|
||
| await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible(); | ||
| await element(by.id('root-screen-tests-Test528')).tap(); | ||
| }); | ||
|
|
||
| it('displays headerRight button after orientation change on Screen1', async () => { | ||
| await expect(element(by.text('Custom Button'))).toBeVisible(100); | ||
| await device.setOrientation('landscape'); | ||
| await expect(element(by.text('Custom Button'))).toBeVisible(100); | ||
| await device.setOrientation('portrait'); | ||
| await expect(element(by.text('Custom Button'))).toBeVisible(100); | ||
| }); | ||
|
|
||
| it('displays headerRight button on Screen1 after orientation change on Screen2', async () => { | ||
| await element(by.text('Go to Screen 2')).tap(); | ||
| await device.setOrientation('landscape'); | ||
| await element(by.id('BackButton')).tap(); | ||
| await expect(element(by.text('Custom Button'))).toBeVisible(100); | ||
| await device.setOrientation('portrait'); | ||
| await expect(element(by.text('Custom Button'))).toBeVisible(100); | ||
| }); | ||
| }); | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.