Skip to content

chore(test): e2e test-tabs-events#3937

Open
LKuchno wants to merge 16 commits intomainfrom
@lkuchno/e2e-test-tabs-events
Open

chore(test): e2e test-tabs-events#3937
LKuchno wants to merge 16 commits intomainfrom
@lkuchno/e2e-test-tabs-events

Conversation

@LKuchno
Copy link
Copy Markdown
Collaborator

@LKuchno LKuchno commented Apr 24, 2026

Description

Updates the test screen component and manual scenario. Adds a Detox suite for tab lifecycle events - onWillAppear, onDidAppear, onWillDisappear, onDidDisappear. Events are surfaced as numbered, color-coded toasts so that both firing order and identity can be asserted programmatically.

Closes: https://github.com/software-mansion/react-native-screens-labs/issues/1123?issue=software-mansion%7Creact-native-screens-labs%7C1183

Changes

e2e/single-feature-tests/tabs/test-tabs-events.e2e.ts
Detox suite with 5 it blocks. A shared dismissToast helper waits for a toast by label and taps it. Toast labels carry numeric prefixes (1. TabA: onWillAppear) so assertions are order-sensitive. Event order assertions are branched by device.getPlatform() to account for the differing iOS / Android firing sequence. The re-tap test is Android only.

test-tabs-events/index.tsx
Added tabBarItemTestID to each route config (tab-a-item, tab-b-item, tab-c-item) so tab bar items are directly addressable by the E2E suite. Added testID to the content container of TabScreen, keyed by route as tabContent-{routeKey}, used to assert which tab is currently visible.

test-tabs-events/scenario.md
Updated E2E status from "ongoing research" to "partially automated" with notes on what is not automated.

@LKuchno LKuchno changed the title chore(test): test-tabs-events screen with scenario chore(test): e2e test-tabs-events Apr 24, 2026
@LKuchno LKuchno added area:tabs Issue related to bottom tabs type:chore A general maintenance task, that does not fall into other categories. type:e2e Actions related to e2e maintenance and development, especially automation. labels Apr 24, 2026
@LKuchno LKuchno marked this pull request as draft April 24, 2026 13:24
@LKuchno
Copy link
Copy Markdown
Collaborator Author

LKuchno commented Apr 27, 2026

Android tests are failing because toasts and the Tabs screen list are displayed 'under' the system navigation bar on older Android versions. This test is waiting for a fix or a workaround.

@LKuchno LKuchno marked this pull request as ready for review April 28, 2026 11:23
@LKuchno LKuchno requested review from Copilot and kkafar April 28, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tabs Issue related to bottom tabs type:chore A general maintenance task, that does not fall into other categories. type:e2e Actions related to e2e maintenance and development, especially automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant