From df0c5470a627e271e54810ee70ba671ea37d3868 Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Fri, 28 Mar 2025 08:38:03 +0100 Subject: [PATCH 1/9] add explanation for skipping 550 and 556 --- apps/src/tests/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/src/tests/index.ts b/apps/src/tests/index.ts index 02f2f76d00..ef58fa9c4a 100644 --- a/apps/src/tests/index.ts +++ b/apps/src/tests/index.ts @@ -7,8 +7,8 @@ export { default as Test349 } from './Test349'; // [E2E skipped]: can't chec 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) export { default as Test432 } from './Test432'; // [E2E created] export { default as Test528 } from './Test528'; // [E2E created](iOS): Detox supports changing orientation only on iOS -export { default as Test550 } from './Test550'; -export { default as Test556 } from './Test556'; +export { default as Test550 } from './Test550'; // [E2E skipped]: The prop does not work, when fixed we can add the test +export { default as Test556 } from './Test556'; // [E2E skipped]: can't check flickering nor non-deterministic white screen bug export { default as Test564 } from './Test564'; export { default as Test577 } from './Test577'; export { default as Test593 } from './Test593'; From f6a7b6ebacc477fccc50d07363d337953a5407f5 Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Fri, 28 Mar 2025 10:52:44 +0100 Subject: [PATCH 2/9] add explanation for skipping 564 --- apps/src/tests/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/src/tests/index.ts b/apps/src/tests/index.ts index ef58fa9c4a..7ba253ec04 100644 --- a/apps/src/tests/index.ts +++ b/apps/src/tests/index.ts @@ -7,9 +7,9 @@ export { default as Test349 } from './Test349'; // [E2E skipped]: can't chec 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) export { default as Test432 } from './Test432'; // [E2E created] export { default as Test528 } from './Test528'; // [E2E created](iOS): Detox supports changing orientation only on iOS -export { default as Test550 } from './Test550'; // [E2E skipped]: The prop does not work, when fixed we can add the test +export { default as Test550 } from './Test550'; // [E2E skipped]: the prop does not work, when fixed we can add the test export { default as Test556 } from './Test556'; // [E2E skipped]: can't check flickering nor non-deterministic white screen bug -export { default as Test564 } from './Test564'; +export { default as Test564 } from './Test564'; // [E2E skipped]: issue still present export { default as Test577 } from './Test577'; export { default as Test593 } from './Test593'; export { default as Test619 } from './Test619'; From ddd4bfd7f6562bd071c9f49e3cdc731820272350 Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Fri, 28 Mar 2025 11:25:16 +0100 Subject: [PATCH 3/9] add e2e test for Test577 --- FabricExample/e2e/examplesTests/tests.e2e.ts | 27 ++++++++++++++++++++ apps/src/tests/index.ts | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/FabricExample/e2e/examplesTests/tests.e2e.ts b/FabricExample/e2e/examplesTests/tests.e2e.ts index 2716b61026..c293307d2b 100644 --- a/FabricExample/e2e/examplesTests/tests.e2e.ts +++ b/FabricExample/e2e/examplesTests/tests.e2e.ts @@ -108,3 +108,30 @@ if (device.getPlatform() === 'ios') { }); }); } + +// This issue is related to iOS modal +if (device.getPlatform() === 'ios') { + describe('Test577', () => { + beforeAll(async () => { + await device.reloadReactNative(); + }); + + it('should Test577 exist', async () => { + await waitFor(element(by.id('root-screen-tests-Test577'))) + .toBeVisible() + .whileElement(by.id('root-screen-examples-scrollview')) + .scroll(600, 'down', NaN, 0.85); + + await expect(element(by.id('root-screen-tests-Test577'))).toBeVisible(); + await element(by.id('root-screen-tests-Test577')).tap(); + }); + + it('does not display content underneath modal when attempting to close it', async () => { + await element(by.text('Open modal')).tap(); + for (let i = 0; i < 5; ++i) { + await element(by.text('Modal')).swipe('down', 'fast'); + await expect(element(by.text('Open modal'))).not.toBeVisible(); + } + }); + }); +} diff --git a/apps/src/tests/index.ts b/apps/src/tests/index.ts index 7ba253ec04..4bbdb1bf37 100644 --- a/apps/src/tests/index.ts +++ b/apps/src/tests/index.ts @@ -10,7 +10,7 @@ export { default as Test528 } from './Test528'; // [E2E created](iOS): Detox export { default as Test550 } from './Test550'; // [E2E skipped]: the prop does not work, when fixed we can add the test export { default as Test556 } from './Test556'; // [E2E skipped]: can't check flickering nor non-deterministic white screen bug export { default as Test564 } from './Test564'; // [E2E skipped]: issue still present -export { default as Test577 } from './Test577'; +export { default as Test577 } from './Test577'; // [E2E created](iOS): issue is related to iOS modal export { default as Test593 } from './Test593'; export { default as Test619 } from './Test619'; export { default as Test624 } from './Test624'; From 0f1f09d928d2dd215ba1de825ea12f5fa50a73dc Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Fri, 28 Mar 2025 11:30:22 +0100 Subject: [PATCH 4/9] refactor file hierarchy for issues e2e tests --- .../Test432.e2e.ts} | 63 ------------------- FabricExample/e2e/issuesTests/Test528.e2e.ts | 37 +++++++++++ FabricExample/e2e/issuesTests/Test577.e2e.ts | 28 +++++++++ 3 files changed, 65 insertions(+), 63 deletions(-) rename FabricExample/e2e/{examplesTests/tests.e2e.ts => issuesTests/Test432.e2e.ts} (54%) create mode 100644 FabricExample/e2e/issuesTests/Test528.e2e.ts create mode 100644 FabricExample/e2e/issuesTests/Test577.e2e.ts diff --git a/FabricExample/e2e/examplesTests/tests.e2e.ts b/FabricExample/e2e/issuesTests/Test432.e2e.ts similarity index 54% rename from FabricExample/e2e/examplesTests/tests.e2e.ts rename to FabricExample/e2e/issuesTests/Test432.e2e.ts index c293307d2b..34ae4c4286 100644 --- a/FabricExample/e2e/examplesTests/tests.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test432.e2e.ts @@ -72,66 +72,3 @@ describe('Test432', () => { await expect(element(by.id('home-headerRight'))).toBeVisible(100); }); }); - -// Detox currently supports orientation only on iOS -if (device.getPlatform() === 'ios') { - describe('Test528', () => { - beforeAll(async () => { - await device.reloadReactNative(); - }); - - it('Test528 should exist', async () => { - await waitFor(element(by.id('root-screen-tests-Test528'))) - .toBeVisible() - .whileElement(by.id('root-screen-examples-scrollview')) - .scroll(600, 'down', NaN, 0.85); - - await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible(); - await element(by.id('root-screen-tests-Test528')).tap(); - }); - - 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); - }); - }); -} - -// This issue is related to iOS modal -if (device.getPlatform() === 'ios') { - describe('Test577', () => { - beforeAll(async () => { - await device.reloadReactNative(); - }); - - it('should Test577 exist', async () => { - await waitFor(element(by.id('root-screen-tests-Test577'))) - .toBeVisible() - .whileElement(by.id('root-screen-examples-scrollview')) - .scroll(600, 'down', NaN, 0.85); - - await expect(element(by.id('root-screen-tests-Test577'))).toBeVisible(); - await element(by.id('root-screen-tests-Test577')).tap(); - }); - - it('does not display content underneath modal when attempting to close it', async () => { - await element(by.text('Open modal')).tap(); - for (let i = 0; i < 5; ++i) { - await element(by.text('Modal')).swipe('down', 'fast'); - await expect(element(by.text('Open modal'))).not.toBeVisible(); - } - }); - }); -} diff --git a/FabricExample/e2e/issuesTests/Test528.e2e.ts b/FabricExample/e2e/issuesTests/Test528.e2e.ts new file mode 100644 index 0000000000..04b153c01a --- /dev/null +++ b/FabricExample/e2e/issuesTests/Test528.e2e.ts @@ -0,0 +1,37 @@ +import { device, expect, element, by } from 'detox'; + +// Detox currently supports orientation only on iOS +if (device.getPlatform() === 'ios') { + describe('Test528', () => { + beforeAll(async () => { + await device.reloadReactNative(); + }); + + it('should Test528 exist', async () => { + await waitFor(element(by.id('root-screen-tests-Test528'))) + .toBeVisible() + .whileElement(by.id('root-screen-examples-scrollview')) + .scroll(600, 'down', NaN, 0.85); + + await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible(); + await element(by.id('root-screen-tests-Test528')).tap(); + }); + + it('displays headerRight button after orientation change on Screen1', 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('displays headerRight button on Screen1 after orientation change on Screen2', 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); + }); + }); +} diff --git a/FabricExample/e2e/issuesTests/Test577.e2e.ts b/FabricExample/e2e/issuesTests/Test577.e2e.ts new file mode 100644 index 0000000000..a2aa194a48 --- /dev/null +++ b/FabricExample/e2e/issuesTests/Test577.e2e.ts @@ -0,0 +1,28 @@ +import { device, expect, element, by } from 'detox'; + +// This issue is related to iOS modal +if (device.getPlatform() === 'ios') { + describe('Test577', () => { + beforeAll(async () => { + await device.reloadReactNative(); + }); + + it('should Test577 exist', async () => { + await waitFor(element(by.id('root-screen-tests-Test577'))) + .toBeVisible() + .whileElement(by.id('root-screen-examples-scrollview')) + .scroll(600, 'down', NaN, 0.85); + + await expect(element(by.id('root-screen-tests-Test577'))).toBeVisible(); + await element(by.id('root-screen-tests-Test577')).tap(); + }); + + it('does not display content underneath modal when attempting to close it', async () => { + await element(by.text('Open modal')).tap(); + for (let i = 0; i < 5; ++i) { + await element(by.text('Modal')).swipe('down', 'fast'); + await expect(element(by.text('Open modal'))).not.toBeVisible(); + } + }); + }); +} From 43d5f555013bc20132e7754bac3c42e7778994f9 Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Mon, 31 Mar 2025 16:14:08 +0200 Subject: [PATCH 5/9] change iOS-specific tests to contain at least one valid test for Android to avoid no tests in test suite warning --- FabricExample/e2e/issuesTests/Test528.e2e.ts | 32 ++++++++++---------- FabricExample/e2e/issuesTests/Test577.e2e.ts | 32 ++++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/FabricExample/e2e/issuesTests/Test528.e2e.ts b/FabricExample/e2e/issuesTests/Test528.e2e.ts index 04b153c01a..b4f196e1ca 100644 --- a/FabricExample/e2e/issuesTests/Test528.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test528.e2e.ts @@ -1,22 +1,22 @@ import { device, expect, element, by } from 'detox'; -// Detox currently supports orientation only on iOS -if (device.getPlatform() === 'ios') { - describe('Test528', () => { - beforeAll(async () => { - await device.reloadReactNative(); - }); +describe('Test528', () => { + beforeAll(async () => { + await device.reloadReactNative(); + }); - it('should Test528 exist', async () => { - await waitFor(element(by.id('root-screen-tests-Test528'))) - .toBeVisible() - .whileElement(by.id('root-screen-examples-scrollview')) - .scroll(600, 'down', NaN, 0.85); + it('should Test528 exist', async () => { + await waitFor(element(by.id('root-screen-tests-Test528'))) + .toBeVisible() + .whileElement(by.id('root-screen-examples-scrollview')) + .scroll(600, 'down', NaN, 0.85); - await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible(); - await element(by.id('root-screen-tests-Test528')).tap(); - }); + await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible(); + await element(by.id('root-screen-tests-Test528')).tap(); + }); + // Detox currently supports orientation only on iOS + if (device.getPlatform() === 'ios') { it('displays headerRight button after orientation change on Screen1', async () => { await expect(element(by.text('Custom Button'))).toBeVisible(100); await device.setOrientation('landscape'); @@ -33,5 +33,5 @@ if (device.getPlatform() === 'ios') { await device.setOrientation('portrait'); await expect(element(by.text('Custom Button'))).toBeVisible(100); }); - }); -} + } +}); diff --git a/FabricExample/e2e/issuesTests/Test577.e2e.ts b/FabricExample/e2e/issuesTests/Test577.e2e.ts index a2aa194a48..19d36b5f24 100644 --- a/FabricExample/e2e/issuesTests/Test577.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test577.e2e.ts @@ -1,22 +1,22 @@ import { device, expect, element, by } from 'detox'; -// This issue is related to iOS modal -if (device.getPlatform() === 'ios') { - describe('Test577', () => { - beforeAll(async () => { - await device.reloadReactNative(); - }); +describe('Test577', () => { + beforeAll(async () => { + await device.reloadReactNative(); + }); - it('should Test577 exist', async () => { - await waitFor(element(by.id('root-screen-tests-Test577'))) - .toBeVisible() - .whileElement(by.id('root-screen-examples-scrollview')) - .scroll(600, 'down', NaN, 0.85); + it('should Test577 exist', async () => { + await waitFor(element(by.id('root-screen-tests-Test577'))) + .toBeVisible() + .whileElement(by.id('root-screen-examples-scrollview')) + .scroll(600, 'down', NaN, 0.85); - await expect(element(by.id('root-screen-tests-Test577'))).toBeVisible(); - await element(by.id('root-screen-tests-Test577')).tap(); - }); + await expect(element(by.id('root-screen-tests-Test577'))).toBeVisible(); + await element(by.id('root-screen-tests-Test577')).tap(); + }); + // This issue is related to iOS modal + if (device.getPlatform() === 'ios') { it('does not display content underneath modal when attempting to close it', async () => { await element(by.text('Open modal')).tap(); for (let i = 0; i < 5; ++i) { @@ -24,5 +24,5 @@ if (device.getPlatform() === 'ios') { await expect(element(by.text('Open modal'))).not.toBeVisible(); } }); - }); -} + } +}); From 6987df23aee919e3c917a0870449fef5cf580ec6 Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Mon, 31 Mar 2025 16:32:43 +0200 Subject: [PATCH 6/9] rephrase descriptions --- FabricExample/e2e/issuesTests/Test528.e2e.ts | 6 +++--- FabricExample/e2e/issuesTests/Test577.e2e.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FabricExample/e2e/issuesTests/Test528.e2e.ts b/FabricExample/e2e/issuesTests/Test528.e2e.ts index b4f196e1ca..e3839697a1 100644 --- a/FabricExample/e2e/issuesTests/Test528.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test528.e2e.ts @@ -5,7 +5,7 @@ describe('Test528', () => { await device.reloadReactNative(); }); - it('should Test528 exist', async () => { + it('Test528 should exist', async () => { await waitFor(element(by.id('root-screen-tests-Test528'))) .toBeVisible() .whileElement(by.id('root-screen-examples-scrollview')) @@ -17,7 +17,7 @@ describe('Test528', () => { // Detox currently supports orientation only on iOS if (device.getPlatform() === 'ios') { - it('displays headerRight button after orientation change on Screen1', async () => { + 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); @@ -25,7 +25,7 @@ describe('Test528', () => { await expect(element(by.text('Custom Button'))).toBeVisible(100); }); - it('displays headerRight button on Screen1 after orientation change on Screen2', async () => { + 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(); diff --git a/FabricExample/e2e/issuesTests/Test577.e2e.ts b/FabricExample/e2e/issuesTests/Test577.e2e.ts index 19d36b5f24..bd72ce647b 100644 --- a/FabricExample/e2e/issuesTests/Test577.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test577.e2e.ts @@ -5,7 +5,7 @@ describe('Test577', () => { await device.reloadReactNative(); }); - it('should Test577 exist', async () => { + it('Test577 should exist', async () => { await waitFor(element(by.id('root-screen-tests-Test577'))) .toBeVisible() .whileElement(by.id('root-screen-examples-scrollview')) @@ -17,7 +17,7 @@ describe('Test577', () => { // This issue is related to iOS modal if (device.getPlatform() === 'ios') { - it('does not display content underneath modal when attempting to close it', async () => { + it('does not display content underneath modal with gesture disabled when attempting to close it', async () => { await element(by.text('Open modal')).tap(); for (let i = 0; i < 5; ++i) { await element(by.text('Modal')).swipe('down', 'fast'); From dada4168810efe84e3b72738455e9d489a497ae1 Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Tue, 1 Apr 2025 12:08:20 +0200 Subject: [PATCH 7/9] add explanation for repeating action in Test577 --- FabricExample/e2e/issuesTests/Test577.e2e.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FabricExample/e2e/issuesTests/Test577.e2e.ts b/FabricExample/e2e/issuesTests/Test577.e2e.ts index bd72ce647b..50128daad1 100644 --- a/FabricExample/e2e/issuesTests/Test577.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test577.e2e.ts @@ -19,6 +19,10 @@ describe('Test577', () => { if (device.getPlatform() === 'ios') { it('does not display content underneath modal with gesture disabled when attempting to close it', async () => { await element(by.text('Open modal')).tap(); + + // Original bug was happening after a few consecutive attempts to close the modal. + // See this GIF: https://github.com/software-mansion/react-native-screens/issues/577#issue-666185758 + // Decided to try it a few times. for (let i = 0; i < 5; ++i) { await element(by.text('Modal')).swipe('down', 'fast'); await expect(element(by.text('Open modal'))).not.toBeVisible(); From baedab6a4641fb63eceab2b00f99e2c006564548 Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Tue, 1 Apr 2025 12:42:37 +0200 Subject: [PATCH 8/9] avoid running pointless tests if they are platform-specific --- FabricExample/e2e/e2e-utils.ts | 1 + FabricExample/e2e/issuesTests/Test528.e2e.ts | 45 ++++++++------------ FabricExample/e2e/issuesTests/Test577.e2e.ts | 27 ++++++------ 3 files changed, 31 insertions(+), 42 deletions(-) create mode 100644 FabricExample/e2e/e2e-utils.ts diff --git a/FabricExample/e2e/e2e-utils.ts b/FabricExample/e2e/e2e-utils.ts new file mode 100644 index 0000000000..d48c69be86 --- /dev/null +++ b/FabricExample/e2e/e2e-utils.ts @@ -0,0 +1 @@ +export const describeIfiOS = device.getPlatform() === 'ios' ? describe : describe.skip; diff --git a/FabricExample/e2e/issuesTests/Test528.e2e.ts b/FabricExample/e2e/issuesTests/Test528.e2e.ts index e3839697a1..ce6436192f 100644 --- a/FabricExample/e2e/issuesTests/Test528.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test528.e2e.ts @@ -1,37 +1,26 @@ import { device, expect, element, by } from 'detox'; +import { describeIfiOS } from '../e2e-utils'; -describe('Test528', () => { +// Detox currently supports orientation only on iOS +describeIfiOS('Test528', () => { beforeAll(async () => { await device.reloadReactNative(); }); - it('Test528 should exist', async () => { - await waitFor(element(by.id('root-screen-tests-Test528'))) - .toBeVisible() - .whileElement(by.id('root-screen-examples-scrollview')) - .scroll(600, 'down', NaN, 0.85); - - await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible(); - await element(by.id('root-screen-tests-Test528')).tap(); + 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); }); - // Detox currently supports orientation only on iOS - if (device.getPlatform() === 'ios') { - 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); - }); - } + 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); + }); }); diff --git a/FabricExample/e2e/issuesTests/Test577.e2e.ts b/FabricExample/e2e/issuesTests/Test577.e2e.ts index 50128daad1..fb7ef42f83 100644 --- a/FabricExample/e2e/issuesTests/Test577.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test577.e2e.ts @@ -1,6 +1,8 @@ import { device, expect, element, by } from 'detox'; +import { describeIfiOS } from '../e2e-utils'; -describe('Test577', () => { +// Detox currently supports orientation only on iOS +describeIfiOS('Test577', () => { beforeAll(async () => { await device.reloadReactNative(); }); @@ -15,18 +17,15 @@ describe('Test577', () => { await element(by.id('root-screen-tests-Test577')).tap(); }); - // This issue is related to iOS modal - if (device.getPlatform() === 'ios') { - it('does not display content underneath modal with gesture disabled when attempting to close it', async () => { - await element(by.text('Open modal')).tap(); + it('does not display content underneath modal with gesture disabled when attempting to close it', async () => { + await element(by.text('Open modal')).tap(); - // Original bug was happening after a few consecutive attempts to close the modal. - // See this GIF: https://github.com/software-mansion/react-native-screens/issues/577#issue-666185758 - // Decided to try it a few times. - for (let i = 0; i < 5; ++i) { - await element(by.text('Modal')).swipe('down', 'fast'); - await expect(element(by.text('Open modal'))).not.toBeVisible(); - } - }); - } + // Original bug was happening after a few consecutive attempts to close the modal. + // See this GIF: https://github.com/software-mansion/react-native-screens/issues/577#issue-666185758 + // Decided to try it a few times. + for (let i = 0; i < 5; ++i) { + await element(by.text('Modal')).swipe('down', 'fast'); + await expect(element(by.text('Open modal'))).not.toBeVisible(); + } + }); }); From edbe16eb755e99061a69541b174b7be7497d0f39 Mon Sep 17 00:00:00 2001 From: Krzysztof Ligarski Date: Tue, 1 Apr 2025 16:55:02 +0200 Subject: [PATCH 9/9] bring back missing setup code to Test528 --- FabricExample/e2e/issuesTests/Test528.e2e.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/FabricExample/e2e/issuesTests/Test528.e2e.ts b/FabricExample/e2e/issuesTests/Test528.e2e.ts index ce6436192f..e8e8b4829e 100644 --- a/FabricExample/e2e/issuesTests/Test528.e2e.ts +++ b/FabricExample/e2e/issuesTests/Test528.e2e.ts @@ -7,6 +7,16 @@ describeIfiOS('Test528', () => { await device.reloadReactNative(); }); + it('Test528 should exist', async () => { + await waitFor(element(by.id('root-screen-tests-Test528'))) + .toBeVisible() + .whileElement(by.id('root-screen-examples-scrollview')) + .scroll(600, 'down', NaN, 0.85); + + await expect(element(by.id('root-screen-tests-Test528'))).toBeVisible(); + await element(by.id('root-screen-tests-Test528')).tap(); + }); + it('headerRight button should be visible after orientation change', async () => { await expect(element(by.text('Custom Button'))).toBeVisible(100); await device.setOrientation('landscape');