test(e2e): fix dashboard E2E test isolation and mobile viewport handling#737
Merged
steilerDev merged 1 commit intobetafrom Mar 11, 2026
Merged
Conversation
Issue 1 (shard 4 — state isolation): Add a top-level test.beforeEach hook that resets dashboard.hiddenCards preference to [] via PATCH before every test. This prevents dismiss tests from leaking hidden-card state into subsequent tests. Also add a GET preferences intercept in interceptDashboardApis() so any test using mocked APIs always sees all cards as visible, regardless of actual server state. Issue 2 (shard 15 — mobile viewport): Timeline cards (Upcoming Milestones, Work Item Progress, Critical Path) and Mini Gantt live inside collapsed <details> sections on mobile. Budget Summary data-testid assertions also only apply to the desktop/tablet flat grid. Add viewport < 768 skip guards to Scenarios 2, 3, 4, Keyboard Navigation (Mini Gantt), and the ARIA Mini Gantt container test so these desktop-grid-specific assertions are not run against the mobile viewport project. Co-Authored-By: Claude e2e-test-engineer (Opus 4.6) <noreply@anthropic.com>
Contributor
|
🎉 This PR is included in version 1.15.0-beta.17 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
test.beforeEachthat resetsdashboard.hiddenCardsto[]viaPATCH /api/users/me/preferencesbefore every test. The dismiss test at line 422 persists card state server-side and was contaminating all subsequent tests in the shard. Also add a GET preferences intercept insideinterceptDashboardApis()so tests using mocked APIs always see all cards visible regardless of actual server state.viewport.width < 768skip guards to Scenarios 2, 3, 4, Keyboard Navigation (Mini Gantt), and the ARIA Mini Gantt container test. On mobile, timeline/mini-gantt cards live inside collapsed<details>sections and budget data-testid elements are not directly visible, so these assertions only apply to the desktop/tablet flat grid.Failing tests fixed
Shard 4 (state leakage):
Shard 15 (mobile viewport):
Test plan
Fixes #736
🤖 Generated with Claude Code