-
-
Notifications
You must be signed in to change notification settings - Fork 643
Expand file tree
/
Copy pathTest528.e2e.ts
More file actions
26 lines (23 loc) · 1.06 KB
/
Test528.e2e.ts
File metadata and controls
26 lines (23 loc) · 1.06 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
import { device, expect, element, by } from 'detox';
import { describeIfiOS } from '../e2e-utils';
// Detox currently supports orientation only on iOS
describeIfiOS('Test528', () => {
beforeAll(async () => {
await device.reloadReactNative();
});
it('headerRight button should be visible after orientation change', 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('headerRight button should be visible after coming back from horizontal screen', 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);
});
});