-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy path9-stress-timeouts.js
39 lines (32 loc) · 1.26 KB
/
9-stress-timeouts.js
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
32
33
34
35
36
37
38
39
describe('StressTimeouts', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
beforeEach(async () => {
await element(by.text('Timeouts')).tap();
});
it(':ios: should handle a short timeout', async () => {
await element(by.id('TimeoutShort')).tap();
await expect(element(by.text('Short Timeout Working!!!'))).toBeVisible();
});
it('should handle zero timeout', async () => {
await element(by.id('TimeoutZero')).tap();
await expect(element(by.text('Zero Timeout Working!!!'))).toBeVisible();
});
it('should ignore a short timeout', async () => {
await element(by.id('TimeoutIgnoreShort')).tap();
await expect(element(by.text('Short Timeout Ignored!!!'))).toBeVisible();
});
it('should ignore a long timeout', async () => {
await element(by.id('TimeoutIgnoreLong')).tap();
await expect(element(by.text('Long Timeout Ignored!!!'))).toBeVisible();
});
it('should handle setImmediate', async () => {
await element(by.id('Immediate')).tap();
await expect(element(by.text('Immediate Working!!!'))).toBeVisible();
});
it('should ignore setInterval', async () => {
await element(by.id('IntervalIgnore')).tap();
await expect(element(by.text('Interval Ignored!!!'))).toBeVisible();
});
});