chore(test, iOS): add e2e test for Stack Header Icons#4343
Open
LKuchno wants to merge 5 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new iOS-only Detox end-to-end test for the Stack v5 “Header Icons” single-feature scenario in the FabricExample app, plus the supporting testIDs and scenario coverage documentation to make the test stable and discoverable.
Changes:
- Added a new Detox spec that validates the SF Symbol icon presence and verifies icon-variant cycling (indirectly for non-SF-Symbol variants) and context-menu behavior.
- Wired the scenario screen with additional
testIDs for stable Detox matching. - Updated scenario metadata and docs to reflect partial (incomplete) e2e coverage and what remains manual-only.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| FabricExample/e2e/single-feature-tests/stack-v5/test-stack-header-icon-ios.e2e.ts | New iOS Detox spec covering header icon + context menu behaviors. |
| apps/src/tests/single-feature-tests/stack-v5/test-stack-header-icon-ios/index.tsx | Adds testIDs on UI elements used by Detox (and minor formatting). |
| apps/src/tests/single-feature-tests/stack-v5/test-stack-header-icon-ios/scenario-description.ts | Marks e2eCoverage as incomplete. |
| apps/src/tests/single-feature-tests/stack-v5/test-stack-header-icon-ios/scenario.md | Documents what the new e2e test covers vs. what remains manual. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kmichalikk
approved these changes
Jul 16, 2026
kmichalikk
left a comment
Contributor
There was a problem hiding this comment.
Looks good. We could add some comment about the indirect checking when cycling directly in the e2e code, there would be less confusion when looking at only the code in the future, but up to you.
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 an end-to-end (Detox) test for the Stack Header Icons (iOS) single-feature test screen (
test-stack-header-icon-ios), covering the automatable subset of its manual scenario. Also wires the test screen with thetestIDs the e2e test relies on and documents the coverage inscenario.md.Closes: https://github.com/software-mansion/react-native-screens-labs/issues/1663
Changes
FabricExample/e2e/single-feature-tests/stack-v5/test-stack-header-icon-ios.e2e.ts.sfSymbolicon (matched via its nativefavoriteaccessibility label on_UIModernBarButton).sfSymbol → xcasset → imageSource → templateSource → sfSymbol) indirectly: thesfSymbolicon must be absent while a non-sfSymbolvariant is selected, anchored on the on-screencurrent-item-icontext.native-class-namesregistry rather than inline string literals.native-class-names.ts: registered the native classes this spec queries —_UIModernBarButton,_UIContextMenuCellContentView,_UIContextMenuSubmenuTitleViewandUILabel— so a native symbol rename only has to be applied in one place.apps/.../test-stack-header-icon-ios/index.tsx: addedtestIDs (cycle-item-icon-button,cycle-menu-icons-button,current-item-icon, …) needed for stable Detox matching; Prettier formatting.scenario-description.ts: updatede2eCoverage.scenario.md: documented what the e2e covers and what remains manual-only.Coverage notes
Only the
sfSymbolvariant exposes a native label;xcasset,imageSourceandtemplateSourcerender as plain images with no id/label/text, so their rendered appearance can't be asserted — cycling is verified indirectly via absence of thesfSymbolicon plus the on-screen variant text. Not covered (manual only): exact rendered image of non-SF-Symbol icons, crossfade, per-item icon positioning inside the menu, nested submenu icons, and menu layout shifts.