Skip to content

Commit d493666

Browse files
committed
add tests for Test528
1 parent 1f37639 commit d493666

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

FabricExample/e2e/examplesTests/tests.e2e.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,40 @@ describe('Test432', () => {
7272
await expect(element(by.id('home-square'))).toBeVisible(100);
7373
});
7474
});
75+
76+
// Detox currently supports orientation only on iOS
77+
if (device.getPlatform() === 'ios') {
78+
describe('Test528', () => {
79+
beforeAll(async () => {
80+
await device.reloadReactNative();
81+
});
82+
83+
it('should Test528 exist', async () => {
84+
await waitFor(element(by.id('root-screen-tests-Test528')))
85+
.toBeVisible()
86+
.whileElement(by.id('root-screen-examples-scrollview'))
87+
.scroll(600, 'down', NaN, 0.85);
88+
89+
await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible();
90+
await element(by.id('root-screen-tests-Test528')).tap();
91+
});
92+
93+
it('displays headerRight button after orientation change on Screen1', async () => {
94+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
95+
await device.setOrientation('landscape');
96+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
97+
await device.setOrientation('portrait');
98+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
99+
});
100+
101+
it('displays headerRight button on Screen1 after orientation change on Screen2', async () => {
102+
await element(by.text('Go to Screen 2')).tap();
103+
await device.setOrientation('landscape');
104+
await element(by.id('BackButton')).tap();
105+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
106+
await device.setOrientation('portrait');
107+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
108+
});
109+
});
110+
}
111+

apps/src/tests/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export { default as Test263 } from './Test263'; // [E2E skipped]: example di
66
export { default as Test349 } from './Test349'; // [E2E skipped]: can't check autofill easily, wrong prop name
77
export { default as Test364 } from './Test364'; // [E2E skipped]: tabBarVisible prop doesn't exist anymore, suggested solution is to change navigator hierarchy (proposed in PR and in react-navigation docs)
88
export { default as Test432 } from './Test432'; // [E2E created]
9-
export { default as Test528 } from './Test528';
9+
export { default as Test528 } from './Test528'; // [E2E created](iOS): Detox supports changing orientation only on iOS
1010
export { default as Test550 } from './Test550';
1111
export { default as Test556 } from './Test556';
1212
export { default as Test564 } from './Test564';

0 commit comments

Comments
 (0)