Skip to content

chore(test): add stack lifecycle events screen test with scenario#4305

Draft
LKuchno wants to merge 7 commits into
mainfrom
@lkuchno/test-stack-lifecycle-events
Draft

chore(test): add stack lifecycle events screen test with scenario#4305
LKuchno wants to merge 7 commits into
mainfrom
@lkuchno/test-stack-lifecycle-events

Conversation

@LKuchno

@LKuchno LKuchno commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a new single-feature test screen exercising the gamma StackContainer screen lifecycle callbacks — onWillAppear, onDidAppear, onWillDisappear, onDidDisappear — across push, pop, and a nested stack. It mirrors the existing test-tabs-lifecycle-events screen 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 shared useMakeLifecycleCallbacks hook attaches the four lifecycle callbacks to every route. The NestedStack route 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

LKuchno and others added 3 commits July 9, 2026 13:50
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>
@LKuchno LKuchno marked this pull request as draft July 9, 2026 13:46
LKuchno added 2 commits July 10, 2026 10:18
…tware-mansion/react-native-screens into @lkuchno/test-stack-lifecycle-events
@LKuchno LKuchno added the area:stack-v5 Issues related to Native Stack v5 implementation label Jul 10, 2026
@LKuchno LKuchno changed the title test: add stack lifecycle events single-feature test chore(test): add stack lifecycle events screen test with scenario Jul 10, 2026
…ps to confim pop/push events for nested stacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:stack-v5 Issues related to Native Stack v5 implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants