-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
09.stress-timeouts.test.js
41 lines (34 loc) · 1.41 KB
/
09.stress-timeouts.test.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
40
41
describe('StressTimeouts', () => {
beforeEach(async () => {
await device.reloadReactNative();
await element(by.text('Timeouts')).tap();
});
it('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();
});
it('should skip over setInterval', async () => {
await element(by.id('SkipOverInterval')).tap();
await expect(element(by.text('Interval Skipped-Over!!!'))).toBeVisible();
});
});