Skip to content

Commit 0571990

Browse files
committed
refactor file hierarchy for issues e2e tests
1 parent 9b2a6ff commit 0571990

3 files changed

Lines changed: 68 additions & 66 deletions

File tree

FabricExample/e2e/examplesTests/tests.e2e.ts renamed to FabricExample/e2e/issuesTests/Test432.e2e.ts

Lines changed: 3 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ describe('Test432', () => {
77

88
it('should Test432 exist', async () => {
99
await waitFor(element(by.id('root-screen-tests-Test432')))
10-
.toBeVisible()
11-
.whileElement(by.id('root-screen-examples-scrollview'))
12-
.scroll(600, 'down', NaN, 0.85);
10+
.toBeVisible()
11+
.whileElement(by.id('root-screen-examples-scrollview'))
12+
.scroll(600, 'down', NaN, 0.85);
1313

1414
await expect(element(by.id('root-screen-tests-Test432'))).toBeVisible();
1515
await element(by.id('root-screen-tests-Test432')).tap();
@@ -72,66 +72,3 @@ 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-
112-
// This issue is related to iOS modal
113-
if (device.getPlatform() === 'ios') {
114-
describe('Test577', () => {
115-
beforeAll(async () => {
116-
await device.reloadReactNative();
117-
});
118-
119-
it('should Test577 exist', async () => {
120-
await waitFor(element(by.id('root-screen-tests-Test577')))
121-
.toBeVisible()
122-
.whileElement(by.id('root-screen-examples-scrollview'))
123-
.scroll(600, 'down', NaN, 0.85);
124-
125-
await expect(element(by.id('root-screen-tests-Test577'))).toBeVisible();
126-
await element(by.id('root-screen-tests-Test577')).tap();
127-
});
128-
129-
it('does not display content underneath modal when attempting to close it', async () => {
130-
await element(by.text('Open modal')).tap();
131-
for (let i = 0; i < 5; ++i) {
132-
await element(by.text('Modal')).swipe('down', 'fast');
133-
await expect(element(by.text('Open modal'))).not.toBeVisible();
134-
}
135-
});
136-
});
137-
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { device, expect, element, by } from 'detox';
2+
3+
// Detox currently supports orientation only on iOS
4+
if (device.getPlatform() === 'ios') {
5+
describe('Test528', () => {
6+
beforeAll(async () => {
7+
await device.reloadReactNative();
8+
});
9+
10+
it('should Test528 exist', async () => {
11+
await waitFor(element(by.id('root-screen-tests-Test528')))
12+
.toBeVisible()
13+
.whileElement(by.id('root-screen-examples-scrollview'))
14+
.scroll(600, 'down', NaN, 0.85);
15+
16+
await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible();
17+
await element(by.id('root-screen-tests-Test528')).tap();
18+
});
19+
20+
it('displays headerRight button after orientation change on Screen1', async () => {
21+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
22+
await device.setOrientation('landscape');
23+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
24+
await device.setOrientation('portrait');
25+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
26+
});
27+
28+
it('displays headerRight button on Screen1 after orientation change on Screen2', async () => {
29+
await element(by.text('Go to Screen 2')).tap();
30+
await device.setOrientation('landscape');
31+
await element(by.id('BackButton')).tap();
32+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
33+
await device.setOrientation('portrait');
34+
await expect(element(by.text('Custom Button'))).toBeVisible(100);
35+
});
36+
});
37+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { device, expect, element, by } from 'detox';
2+
3+
// This issue is related to iOS modal
4+
if (device.getPlatform() === 'ios') {
5+
describe('Test577', () => {
6+
beforeAll(async () => {
7+
await device.reloadReactNative();
8+
});
9+
10+
it('should Test577 exist', async () => {
11+
await waitFor(element(by.id('root-screen-tests-Test577')))
12+
.toBeVisible()
13+
.whileElement(by.id('root-screen-examples-scrollview'))
14+
.scroll(600, 'down', NaN, 0.85);
15+
16+
await expect(element(by.id('root-screen-tests-Test577'))).toBeVisible();
17+
await element(by.id('root-screen-tests-Test577')).tap();
18+
});
19+
20+
it('does not display content underneath modal when attempting to close it', async () => {
21+
await element(by.text('Open modal')).tap();
22+
for (let i = 0; i < 5; ++i) {
23+
await element(by.text('Modal')).swipe('down', 'fast');
24+
await expect(element(by.text('Open modal'))).not.toBeVisible();
25+
}
26+
});
27+
});
28+
}

0 commit comments

Comments
 (0)