From ed951bc625eff7e9a20543e8d40f464af27c1126 Mon Sep 17 00:00:00 2001 From: lkuchno Date: Mon, 6 Jul 2026 12:38:11 +0200 Subject: [PATCH 01/10] manual scenario for test-stack-simple-nav --- .../test-stack-simple-nav/scenario.md | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md new file mode 100644 index 0000000000..a3562e5b7b --- /dev/null +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md @@ -0,0 +1,151 @@ +# Test Scenario: Simple navigation + +## Details + +**Description:** Verifies basic push and pop navigation on the gamma/v5 +`StackContainer`. The route stack starts with **Home** and can push **A** +or **B** any number of times (including re-pushing a route that is already +on the stack), each push creating a new screen instance with its own unique +`routeKey` exposed via `useStackNavigationContext`. Non-root screens expose +a **Pop** button that calls `navigation.pop(routeKey)` on themselves. The +test validates that JS-driven push/pop via on-screen buttons produces +consistent stack state on both platforms, that the iOS native header back +button and interactive edge-swipe-back gesture behave the same as **Pop**, +that `routeKey` values are unique per pushed instance (even for repeated +pushes of the same route name), and that the root screen (**Home**) cannot +be popped and shows no back button. On Android there is no header back +button and the system/hardware back button does not currently pop the +stack (see issue #1459), so back-button steps are iOS-only. + +**OS test creation version:** iOS 18.6 and 26.5, Android API Level 36. + +## E2E test + +TBD: Automation is planned and should be straightforward for the +button-driven push/pop steps (similar in scope to the tabs +`test-tabs-simple-nav` suite). Native back button, iOS edge-swipe gesture, +and Android hardware back steps may need platform-specific handling and are +not yet implemented. + +## Prerequisites + +- iOS device or simulator +- Android emulator or device + +## Note + +- Each screen shows two labels: `Name` (the route name: `Home`, `A`, or + `B`) and `Key` (the route's unique `routeKey`). Use the `Key` value to + tell apart multiple stacked instances of the same route name. +- The `Key` has the form `r--`, where `` comes from a + global counter that increments on every push and is **never reset** for + the lifetime of the app session (it is shared across all Stack + containers). Do **not** expect specific numbers such as `r-A-1`: the + exact suffix depends on how many screens were pushed earlier in the + session and will differ between runs and after a JS reload. Only the + **relationships** matter — every push produces a strictly new `Key`, and + a preserved (not recreated) screen keeps the same `Key`. +- **Android:** the gamma Stack does not render a header back button, and + the Android system/hardware back button does not currently pop the stack + (see issue #1459). All back-button steps below are therefore **iOS + only**; on Android use the on-screen **Pop** button to go back. + +## Steps + +### Baseline + +1. Launch the app and navigate to the **Simple navigation** screen (Stack + v5). + +- [ ] The **Home** screen is shown with a light blue background, `Name: + Home`, and a `Key` of the form `r-Home-`. No back button is visible in + the header. No **Pop** button is shown, only **Push A** and **Push B**. + Note the displayed `Key` value to compare against later steps. + +### Push navigation + +2. Tap **Push A**. + +- [ ] Screen **A** is pushed. Background is light yellow, `Name: A`, and a + `Key` of the form `r-A-` is shown (a new value, distinct from Home's). + On iOS a native back button is visible in the header (Android shows no + header back button). **Push A**, **Push B**, and **Pop** buttons are all + shown. Note this `Key` value. + +3. While on **A**, tap **Push B**. + +- [ ] Screen **B** is pushed on top of **A**. Background is green, `Name: + B`, and a new `Key` of the form `r-B-` is shown (distinct from all + previous keys). On iOS a native back button is visible in the header. + Note this `Key` value. + +### Re-pushing an already-present route + +4. While on **B**, tap **Push A** again. + +- [ ] A new instance of screen **A** is pushed on top of the stack (stack + is now Home, A, B, A). `Name: A`, background light yellow, and a new + `r-A-` `Key` that is **different** from the `Key` shown in step 2. + +### Pop via the on-screen button + +5. Tap **Pop**. + +- [ ] Returns to screen **B**. `Name: B` and the **same** `Key` value + observed in step 3 (the instance was preserved, not recreated). + +6. Tap **Pop** again. + +- [ ] Returns to the original screen **A**. `Name: A` and the **same** `Key` + value observed in step 2. + +7. Tap **Pop** again. + +- [ ] Returns to **Home**. No **Pop** button is shown and, on iOS, no + header back button appears (root screen reached). + +### Native header back button (iOS only) + +8. On iOS, tap **Push A**, then tap **Push B**. Then tap the native back + button in the header (not the **Pop** button). + +- [ ] Tapping the native back button behaves the same as tapping **Pop**: + returns to screen **A** with its `Key` unchanged. No crash and no + inconsistent state. + +### iOS edge-swipe-back gesture (iOS only) + +9. On iOS, while on screen **A** or **B**, swipe from the left screen edge + to the right to trigger the interactive pop gesture. + +- [ ] Completing the swipe pops the current screen, identical in effect to + tapping **Pop**. The screen below is shown with its original, + unchanged `Key`. +- [ ] Starting the swipe and releasing before the halfway point cancels + the gesture: the current screen returns to place and no navigation + change occurs. + +### Route key uniqueness (edge case) + +10. From **Home**, tap **Push A**. While on the newly pushed **A**, tap + **Push A** again. While on that new **A**, tap **Push A** once more, + without popping in between. + +- [ ] Three separate **A** instances are stacked. Each shows `Name: A`, + but the `Key` value is different every time you land on a new push. + +### Rapid tapping (edge case) + +11. From any screen, rapidly tap **Push A** several times in quick + succession, before each push transition finishes animating. + +- [ ] Each tap results in exactly one additional **A** screen being + pushed. No crash, no dropped pushes, and no duplicate `Key` values. + +12. From the deepest screen reached in step 11, rapidly tap **Pop** + several times in quick succession, before each pop transition + finishes animating. + +- [ ] The stack pops one screen per completed transition, eventually + stabilizing on **Home**. No crash occurs, and no attempt is made to pop + past the root screen. From b563db8cd2592b24833fbe2454f7d7661e0cea4b Mon Sep 17 00:00:00 2001 From: lkuchno Date: Mon, 6 Jul 2026 12:40:02 +0200 Subject: [PATCH 02/10] shorten scenario description --- .../test-stack-simple-nav/scenario.md | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md index a3562e5b7b..9b381d4d9f 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md @@ -2,20 +2,16 @@ ## Details -**Description:** Verifies basic push and pop navigation on the gamma/v5 -`StackContainer`. The route stack starts with **Home** and can push **A** -or **B** any number of times (including re-pushing a route that is already -on the stack), each push creating a new screen instance with its own unique -`routeKey` exposed via `useStackNavigationContext`. Non-root screens expose -a **Pop** button that calls `navigation.pop(routeKey)` on themselves. The -test validates that JS-driven push/pop via on-screen buttons produces -consistent stack state on both platforms, that the iOS native header back -button and interactive edge-swipe-back gesture behave the same as **Pop**, -that `routeKey` values are unique per pushed instance (even for repeated -pushes of the same route name), and that the root screen (**Home**) cannot -be popped and shows no back button. On Android there is no header back -button and the system/hardware back button does not currently pop the -stack (see issue #1459), so back-button steps are iOS-only. +**Description:** Verify basic push and pop navigation on the gamma/v5 +`StackContainer`. The stack starts with **Home** and can push **A** or **B** +any number of times (including re-pushing a route already on the stack), +each push creating a new screen instance with its own unique `routeKey`; +non-root screens expose a **Pop** button. The test validates that push/pop +via the on-screen buttons, the iOS native header back button, and the iOS +edge-swipe-back gesture all produce consistent stack state, that `routeKey` +values are unique per pushed instance, and that the root screen (**Home**) +cannot be popped. See the Notes for `routeKey` behavior and the Android +back-button caveat (issue #1459). **OS test creation version:** iOS 18.6 and 26.5, Android API Level 36. From b9461d508cf3325967dbd353e5ec48026393a6a1 Mon Sep 17 00:00:00 2001 From: lkuchno Date: Mon, 6 Jul 2026 13:36:04 +0200 Subject: [PATCH 03/10] screen name update --- .../stack-v5/test-stack-simple-nav/scenario-description.ts | 2 +- .../stack-v5/test-stack-simple-nav/scenario.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario-description.ts b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario-description.ts index 4ea629bfd0..d782343d9a 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario-description.ts +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario-description.ts @@ -1,7 +1,7 @@ import type { ScenarioDescription } from '@apps/tests/shared/helpers'; export const scenarioDescription: ScenarioDescription = { - name: 'Simple navigation scenario', + name: 'Simple stack navigation', key: 'test-stack-simple-nav', details: 'Test simple push and pop operations', platforms: ['android', 'ios'], diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md index 9b381d4d9f..f7e3a4fbf1 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md @@ -50,7 +50,7 @@ not yet implemented. ### Baseline -1. Launch the app and navigate to the **Simple navigation** screen (Stack +1. Launch the app and navigate to the **Simple stack navigation** screen (Stack v5). - [ ] The **Home** screen is shown with a light blue background, `Name: From ffa858781ec33c37be2ed156caeb04dcd515ebe7 Mon Sep 17 00:00:00 2001 From: lkuchno Date: Mon, 6 Jul 2026 13:38:40 +0200 Subject: [PATCH 04/10] update issue path to point correct one --- .../stack-v5/test-stack-simple-nav/scenario.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md index f7e3a4fbf1..525337e526 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md @@ -43,7 +43,7 @@ not yet implemented. a preserved (not recreated) screen keeps the same `Key`. - **Android:** the gamma Stack does not render a header back button, and the Android system/hardware back button does not currently pop the stack - (see issue #1459). All back-button steps below are therefore **iOS + (see issue [#1459](https://github.com/software-mansion/react-native-screens-labs/issues/1459)). All back-button steps below are therefore **iOS only**; on Android use the on-screen **Pop** button to go back. ## Steps From 987d1af61ffbf834d96914630a50c180f2caec77 Mon Sep 17 00:00:00 2001 From: lkuchno Date: Tue, 7 Jul 2026 11:49:42 +0200 Subject: [PATCH 05/10] defining header title to enable header back button on Android --- .../stack-v5/test-stack-simple-nav/index.tsx | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/index.tsx b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/index.tsx index c2c780dbbb..88e4056b11 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/index.tsx +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/index.tsx @@ -21,17 +21,32 @@ function StackSetup() { { name: 'Home', Component: HomeScreen, - options: {}, + // Rendering a header (via headerConfig) makes the native back + // button appear on non-root screens, including on Android. The + // root screen (Home) always hides the back button. + options: { + headerConfig: { + title: 'Home', + }, + }, }, { name: 'A', Component: AScreen, - options: {}, + options: { + headerConfig: { + title: 'A', + }, + }, }, { name: 'B', Component: BScreen, - options: {}, + options: { + headerConfig: { + title: 'B', + }, + }, }, ]} /> From c585732dc6fe83e6ad015bbb12a901efb6a76e89 Mon Sep 17 00:00:00 2001 From: lkuchno Date: Tue, 7 Jul 2026 11:50:26 +0200 Subject: [PATCH 06/10] updateing scenario with launch App instruction to enable test on android for back gesture and back button options --- .../test-stack-simple-nav/scenario.md | 87 ++++++++++++------- 1 file changed, 56 insertions(+), 31 deletions(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md index 525337e526..f6bbe1f654 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md @@ -7,11 +7,12 @@ any number of times (including re-pushing a route already on the stack), each push creating a new screen instance with its own unique `routeKey`; non-root screens expose a **Pop** button. The test validates that push/pop -via the on-screen buttons, the iOS native header back button, and the iOS -edge-swipe-back gesture all produce consistent stack state, that `routeKey` -values are unique per pushed instance, and that the root screen (**Home**) -cannot be popped. See the Notes for `routeKey` behavior and the Android -back-button caveat (issue #1459). +via the on-screen buttons, the native header back button, and the +edge-swipe-back / system gesture-back produce +consistent stack state, that `routeKey` values are unique per pushed +instance, and that the root screen (**Home**) cannot be popped. See the +Notes for `routeKey` behavior and how the two platforms are launched +(issue #1459). **OS test creation version:** iOS 18.6 and 26.5, Android API Level 36. @@ -20,14 +21,36 @@ back-button caveat (issue #1459). TBD: Automation is planned and should be straightforward for the button-driven push/pop steps (similar in scope to the tabs `test-tabs-simple-nav` suite). Native back button, iOS edge-swipe gesture, -and Android hardware back steps may need platform-specific handling and are -not yet implemented. +and Android system gesture-back steps may need platform-specific handling +and are not yet implemented. ## Prerequisites - iOS device or simulator - Android emulator or device +### iOS launch + +- Run the app normally and navigate to the **Simple stack navigation** + screen (Stack v5) from the in-app scenario selection menu. + +### Android launch + +- To test on Android, run the screen **directly** by editing + [apps/App.tsx](../../../../../App.tsx): import and render + `TestStackSimpleNav` as the root component instead of `Example`, e.g.: + + ```tsx + import { TestStackSimpleNav as Example } from './src/tests/single-feature-tests'; + ``` + + With the gamma `StackContainer` at the root, the Android system + gesture-back pops the stack directly. + +- The Android system gesture-back requires **Gesture navigation** to be + enabled on the emulator/device. If it is not already set, enable it + manually in **Settings → Navigation mode → select Gesture navigation**. + ## Note - Each screen shows two labels: `Name` (the route name: `Home`, `A`, or @@ -41,17 +64,21 @@ not yet implemented. session and will differ between runs and after a JS reload. Only the **relationships** matter — every push produces a strictly new `Key`, and a preserved (not recreated) screen keeps the same `Key`. -- **Android:** the gamma Stack does not render a header back button, and - the Android system/hardware back button does not currently pop the stack - (see issue [#1459](https://github.com/software-mansion/react-native-screens-labs/issues/1459)). All back-button steps below are therefore **iOS - only**; on Android use the on-screen **Pop** button to go back. +- **Android:** when the screen is launched **directly** via `App.tsx` (see + the Android launch prerequisite),both the **native header back button** and + the **system gesture-back** work — the same as on iOS. These only fail when the screen + is nested inside the example app's own navigation (issue + [#1459](https://github.com/software-mansion/react-native-screens-labs/issues/1459)), + which is exactly why Android is tested via the direct launch. On both + platforms the on-screen **Pop** button always works. ## Steps ### Baseline -1. Launch the app and navigate to the **Simple stack navigation** screen (Stack - v5). +1. Launch the app for the platform under test (see Prerequisites: iOS from + the selection menu, Android directly via `App.tsx`) so the **Home** + screen of the Simple stack navigation is shown. - [ ] The **Home** screen is shown with a light blue background, `Name: Home`, and a `Key` of the form `r-Home-`. No back button is visible in @@ -64,16 +91,14 @@ not yet implemented. - [ ] Screen **A** is pushed. Background is light yellow, `Name: A`, and a `Key` of the form `r-A-` is shown (a new value, distinct from Home's). - On iOS a native back button is visible in the header (Android shows no - header back button). **Push A**, **Push B**, and **Pop** buttons are all - shown. Note this `Key` value. + A native back button is visible in the header. **Push A**, **Push B**, and **Pop** + buttons are all shown. Note this `Key` value. 3. While on **A**, tap **Push B**. - [ ] Screen **B** is pushed on top of **A**. Background is green, `Name: - B`, and a new `Key` of the form `r-B-` is shown (distinct from all - previous keys). On iOS a native back button is visible in the header. - Note this `Key` value. + B`, and a new `Key` of the form `r-B-` is shown. + A native back button is visible in the header. Note this `Key` value. ### Re-pushing an already-present route @@ -97,29 +122,29 @@ not yet implemented. 7. Tap **Pop** again. -- [ ] Returns to **Home**. No **Pop** button is shown and, on iOS, no - header back button appears (root screen reached). +- [ ] Returns to **Home**. No **Pop** button is shown and no header back + button appears (root screen reached). -### Native header back button (iOS only) +### Native header back button -8. On iOS, tap **Push A**, then tap **Push B**. Then tap the native back - button in the header (not the **Pop** button). +8. Tap **Push A**, then tap **Push B**. Then tap the native back button in the +header. - [ ] Tapping the native back button behaves the same as tapping **Pop**: returns to screen **A** with its `Key` unchanged. No crash and no inconsistent state. -### iOS edge-swipe-back gesture (iOS only) +### Edge-swipe / system gesture-back -9. On iOS, while on screen **A** or **B**, swipe from the left screen edge +9. While on screen **A** or **B**, swipe from the left screen edge to the right to trigger the interactive pop gesture. -- [ ] Completing the swipe pops the current screen, identical in effect to - tapping **Pop**. The screen below is shown with its original, +- [ ] Completing the swipe/gesture pops the current screen, identical in + effect to tapping **Pop**. The screen below is shown with its original, unchanged `Key`. -- [ ] Starting the swipe and releasing before the halfway point cancels - the gesture: the current screen returns to place and no navigation - change occurs. +- [ ] Starting the swipe/gesture and releasing before the halfway point + cancels it: the current screen returns to place and no navigation change + occurs. ### Route key uniqueness (edge case) From 7bee2bd1f74cabb0c503ab8da3a41c8930535322 Mon Sep 17 00:00:00 2001 From: lkuchno Date: Tue, 7 Jul 2026 11:53:27 +0200 Subject: [PATCH 07/10] scenario update --- .../stack-v5/test-stack-simple-nav/scenario.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md index f6bbe1f654..c1a794ff18 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md @@ -134,7 +134,7 @@ header. returns to screen **A** with its `Key` unchanged. No crash and no inconsistent state. -### Edge-swipe / system gesture-back +### Edge-swipe / system gesture-back 9. While on screen **A** or **B**, swipe from the left screen edge to the right to trigger the interactive pop gesture. From 9c472e8bf4f109f83bdcb7261eb92077890eb7dd Mon Sep 17 00:00:00 2001 From: lkuchno Date: Mon, 13 Jul 2026 08:18:36 +0200 Subject: [PATCH 08/10] remove RouteInformation function and reuse shared StackRouteInformation --- .../stack-v5/test-stack-simple-nav/index.tsx | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/index.tsx b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/index.tsx index 88e4056b11..d524f09a56 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/index.tsx +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/index.tsx @@ -1,14 +1,13 @@ import React from 'react'; import { scenarioDescription } from './scenario-description'; import { createScenario } from '@apps/tests/shared/helpers'; -import { StyleSheet, Text, View } from 'react-native'; import { StackContainer, - useStackNavigationContext, } from '@apps/shared/gamma/containers/stack'; import { CenteredLayoutView } from '@apps/shared/CenteredLayoutView'; import { Colors } from '@apps/shared/styling'; import { StackNavigationButtons } from '@apps/tests/shared/components/stack-v5/StackNavigationButtons'; +import { StackRouteInformation } from '@apps/tests/shared/components/stack-v5/StackRouteInformation'; function TestStackSimpleNav() { return ; @@ -56,7 +55,7 @@ function StackSetup() { function HomeScreen() { return ( - + ); @@ -65,7 +64,7 @@ function HomeScreen() { function AScreen() { return ( - + ); @@ -74,29 +73,10 @@ function AScreen() { function BScreen() { return ( - + ); } -function RouteInformation(props: { routeName: string }) { - const routeKey = useStackNavigationContext().routeKey; - - return ( - - Name: {props.routeName} - Key: {routeKey} - - ); -} - -const styles = StyleSheet.create({ - routeInformation: { - color: 'black', - fontSize: 20, - fontWeight: 'bold', - }, -}); - export default createScenario(TestStackSimpleNav, scenarioDescription); From 7a272f3b4bfb8a044ecf73c8964545c3515018a7 Mon Sep 17 00:00:00 2001 From: lkuchno Date: Mon, 13 Jul 2026 08:25:48 +0200 Subject: [PATCH 09/10] scenario updated to dont refer to key format --- .../stack-v5/test-stack-simple-nav/scenario.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md index c1a794ff18..497aa290bb 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md @@ -56,14 +56,10 @@ and are not yet implemented. - Each screen shows two labels: `Name` (the route name: `Home`, `A`, or `B`) and `Key` (the route's unique `routeKey`). Use the `Key` value to tell apart multiple stacked instances of the same route name. -- The `Key` has the form `r--`, where `` comes from a - global counter that increments on every push and is **never reset** for +- `Key` values use a session-global counterthat increments on every push and is **never reset** for the lifetime of the app session (it is shared across all Stack - containers). Do **not** expect specific numbers such as `r-A-1`: the - exact suffix depends on how many screens were pushed earlier in the - session and will differ between runs and after a JS reload. Only the - **relationships** matter — every push produces a strictly new `Key`, and - a preserved (not recreated) screen keeps the same `Key`. + containers). Only the **relationships** matter — every push produces a strictly + new `Key`, and a preserved (not recreated) screen keeps the same `Key`. - **Android:** when the screen is launched **directly** via `App.tsx` (see the Android launch prerequisite),both the **native header back button** and the **system gesture-back** work — the same as on iOS. These only fail when the screen @@ -81,7 +77,7 @@ and are not yet implemented. screen of the Simple stack navigation is shown. - [ ] The **Home** screen is shown with a light blue background, `Name: - Home`, and a `Key` of the form `r-Home-`. No back button is visible in + Home`, and a `Key`. No back button is visible in the header. No **Pop** button is shown, only **Push A** and **Push B**. Note the displayed `Key` value to compare against later steps. @@ -90,14 +86,14 @@ and are not yet implemented. 2. Tap **Push A**. - [ ] Screen **A** is pushed. Background is light yellow, `Name: A`, and a - `Key` of the form `r-A-` is shown (a new value, distinct from Home's). + `Key` with a new value, distinct from Home's. A native back button is visible in the header. **Push A**, **Push B**, and **Pop** buttons are all shown. Note this `Key` value. 3. While on **A**, tap **Push B**. - [ ] Screen **B** is pushed on top of **A**. Background is green, `Name: - B`, and a new `Key` of the form `r-B-` is shown. + B`, and a new `Key`is shown. A native back button is visible in the header. Note this `Key` value. ### Re-pushing an already-present route @@ -106,7 +102,7 @@ and are not yet implemented. - [ ] A new instance of screen **A** is pushed on top of the stack (stack is now Home, A, B, A). `Name: A`, background light yellow, and a new - `r-A-` `Key` that is **different** from the `Key` shown in step 2. + `Key` that is **different** from the `Key` shown in step 2. ### Pop via the on-screen button From 1936387195a096f3374e7cadefcb58d9ee8af333 Mon Sep 17 00:00:00 2001 From: lkuchno Date: Thu, 16 Jul 2026 13:49:55 +0200 Subject: [PATCH 10/10] removing information about backgroud color --- .../stack-v5/test-stack-simple-nav/scenario.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md index 497aa290bb..16ba795afc 100644 --- a/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md +++ b/apps/src/tests/single-feature-tests/stack-v5/test-stack-simple-nav/scenario.md @@ -76,7 +76,7 @@ and are not yet implemented. the selection menu, Android directly via `App.tsx`) so the **Home** screen of the Simple stack navigation is shown. -- [ ] The **Home** screen is shown with a light blue background, `Name: +- [ ] The **Home** screen is shown with `Name: Home`, and a `Key`. No back button is visible in the header. No **Pop** button is shown, only **Push A** and **Push B**. Note the displayed `Key` value to compare against later steps. @@ -101,7 +101,7 @@ and are not yet implemented. 4. While on **B**, tap **Push A** again. - [ ] A new instance of screen **A** is pushed on top of the stack (stack - is now Home, A, B, A). `Name: A`, background light yellow, and a new + is now Home, A, B, A). `Name: A` and a new `Key` that is **different** from the `Key` shown in step 2. ### Pop via the on-screen button