Repository navigation
test(e2e): drop tests that other tests already cover - #1259
Conversation
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
e2e/tests/basic-pager.e2e.ts:36 |
RTL test drops the only panel-control coverage with pages added/removed |
Reviewed with this repository's own Sentinel configuration (9ed912f7fb58).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 20166e2. The verdict and the full list are in the summary comment.
| await openBasicPager(device, app, screen, 'horizontal', 'rtl'); | ||
| await verifySwipeToNextPage(screen, 'horizontal', 'left'); | ||
| await verifyControls(screen); | ||
| await expectActivePage(screen, 1); |
There was a problem hiding this comment.
🟡 Minor · RTL test drops the only panel-control coverage with pages added/removed
After this change, no e2e test drives the navigation panel controls in RTL because verifyControls now runs only in the LTR horizontal test, leaving no coverage of setPage after page count changes in RTL. The iOS setPage handler rewrites the index as children.count - 1 - page, so the direction inversion makes the removed run non-redundant despite the comment claiming identical behavior.
| await expectActivePage(screen, 1); | |
| await openBasicPager(device, app, screen, 'horizontal', 'rtl'); | |
| await verifySwipeToNextPage(screen, 'horizontal', 'left'); | |
| await verifyControls(screen); |
Details
Also raised here
Also raised at this location by persona senior-developer: RTL programmatic setPage loses its only e2e coverage — After this change no e2e test calls setPage (the navigation-panel buttons) in RTL or in vertical: the RTL and vertical basic-pager tests now stop at expectActivePage(screen, 1), so verifyControls — the only driver of next/prev/start/last/add/remove-page — runs once, in LTR horizontal. A regression in the RTL setPage mapping, which goes through direction-specific native code (ComposePagerView.setLayoutDirection and its isRtlHorizontal branch on Android, PagerViewProvider.layoutDirection on iOS), would now pass CI while swipes in RTL are still checked. The new comment asserts the buttons behave "the same in every orientation and direction", but nothing — no type, test or shared constant — enforces that; the justification is an assumption about native behaviour, not an invariant, and it is exactly the direction-dependent path the test used to exercise. Keeping verifyControls in the RTL block costs one test's runtime and keeps that path covered.
persona: senior-developer, javascript
Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.
Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.
🟢 e2e: 65 passedAll 65 tests in 25 files
Tested by e2e 0.23.1 · 4m 9s · android · run artifacts |
🟢 e2e ios-spm: 49 passedAll 49 tests in 18 files
Tested by e2e 0.23.1 · 6m 53s · ios · run artifacts |
🟢 e2e ios: 49 passedAll 49 tests in 18 files
Tested by e2e 0.23.1 · 7m 58s · ios · run artifacts |
No description provided.