chore(test): add stack lifecycle events screen test with scenario#4305
Draft
LKuchno wants to merge 7 commits into
Draft
chore(test): add stack lifecycle events screen test with scenario#4305LKuchno wants to merge 7 commits into
LKuchno wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Stack v5 single-feature test screen to manually verify gamma StackContainer lifecycle callbacks (onWillAppear, onDidAppear, onWillDisappear, onDidDisappear) across push/pop flows, including a nested stack, using toast messages to visualize event order.
Changes:
- Introduces a new “Stack lifecycle events” scenario screen that triggers toast notifications from lifecycle callbacks for each route (outer + nested stack).
- Adds a detailed manual test scenario (
scenario.md) documenting expected event sequences per platform and per navigation method. - Registers the new scenario in the Stack v5 scenario group.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| apps/src/tests/single-feature-tests/stack-v5/test-stack-lifecycle-events/scenario.md | New manual scenario documenting expected lifecycle event ordering for push/pop and nested stack flows. |
| apps/src/tests/single-feature-tests/stack-v5/test-stack-lifecycle-events/scenario-description.ts | Adds scenario metadata (name/key/details/platforms/e2eCoverage). |
| apps/src/tests/single-feature-tests/stack-v5/test-stack-lifecycle-events/index.tsx | Implements the new test screen with outer + nested StackContainer and toast-based lifecycle callbacks. |
| apps/src/tests/single-feature-tests/stack-v5/index.ts | Registers and exports the new Stack v5 scenario so it appears in the scenario group/menu. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…tware-mansion/react-native-screens into @lkuchno/test-stack-lifecycle-events
…ps to confim pop/push events for nested stacks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new single-feature test screen exercising the gamma
StackContainerscreen lifecycle callbacks —onWillAppear,onDidAppear,onWillDisappear,onDidDisappear— across push, pop, and a nested stack. It mirrors the existingtest-tabs-lifecycle-eventsscreen so stack and tabs lifecycle behaviour can be checked with the same toast-based visualization.Each transition pushes a color-coded toast (
onWillAppear- green,onWillDisappear- light navy,onDidAppear- light blue,onDidDisappear— dark navy) so the fired events and their order are visible on device.Changes
test-stack-lifecycle-events/index.tsx— test screen: an outer stack (Home → A → NestedStack) and a nested stack (NestedHome → NestedA). A shareduseMakeLifecycleCallbackshook attaches the four lifecycle callbacks to every route. TheNestedStackroute hides its outer header (headerConfig: { hidden: true }) so the nested stack's own header isn't doubled.test-stack-lifecycle-events/scenario.md— manual scenario covering push, pop via the Pop button / header back button / native back gesture / system back, and nested-stack push/pop, with per-platform expected event orderings.test-stack-lifecycle-events/scenario-description.ts— scenario metadata (e2eCoverage: 'tbd', platforms iOS + Android).stack-v5/index.ts— registers the scenario in the Stack v5 group.