-
-
Notifications
You must be signed in to change notification settings - Fork 643
Expand file tree
/
Copy pathTest577.e2e.ts
More file actions
31 lines (26 loc) · 1.18 KB
/
Test577.e2e.ts
File metadata and controls
31 lines (26 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { device, expect, element, by } from 'detox';
import { describeIfiOS } from '../e2e-utils';
// Detox currently supports orientation only on iOS
describeIfiOS('Test577', () => {
beforeAll(async () => {
await device.reloadReactNative();
});
it('Test577 should exist', async () => {
await waitFor(element(by.id('root-screen-tests-Test577')))
.toBeVisible()
.whileElement(by.id('root-screen-examples-scrollview'))
.scroll(600, 'down', NaN, 0.85);
await expect(element(by.id('root-screen-tests-Test577'))).toBeVisible();
await element(by.id('root-screen-tests-Test577')).tap();
});
it('does not display content underneath modal with gesture disabled when attempting to close it', async () => {
await element(by.text('Open modal')).tap();
// Original bug was happening after a few consecutive attempts to close the modal.
// See this GIF: https://github.com/software-mansion/react-native-screens/issues/577#issue-666185758
// Decided to try it a few times.
for (let i = 0; i < 5; ++i) {
await element(by.text('Modal')).swipe('down', 'fast');
await expect(element(by.text('Open modal'))).not.toBeVisible();
}
});
});