Skip to content

test(e2e): fix post-refetch assertions to use toContainText() with retry#1376

Merged
steilerDev merged 2 commits intobetafrom
fix/e2e-scenario-tests-retry-assertions
Apr 28, 2026
Merged

test(e2e): fix post-refetch assertions to use toContainText() with retry#1376
steilerDev merged 2 commits intobetafrom
fix/e2e-scenario-tests-retry-assertions

Conversation

@steilerDev
Copy link
Copy Markdown
Owner

Summary

  • Replace textContent() + sync expect().toContain() with expect(locator).toContainText() in Scenarios 1–5 of the Filter-aware summary rows describe block in budget-source-filter.spec.ts
  • The old pattern reads the DOM immediately after waitForResponse resolves, before React has committed the setBreakdown() state update — causing intermittent CI failures under load
  • toContainText() retries with the configured expect timeout (7s desktop / 10s tablet/mobile) so the assertion waits for the DOM to reflect the new value

Test plan

  • Quality Gates pass on beta PR

Co-Authored-By: Claude e2e-test-engineer (Sonnet 4.6) noreply@anthropic.com
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Frank Steiler and others added 2 commits April 28, 2026 10:10
Replace textContent() + sync expect() with expect(locator).toContainText()
in Scenarios 1-5 of the Filter-aware summary rows test block. The old
pattern reads the DOM immediately after waitForResponse resolves, before
React has committed the state update — causing intermittent CI failures
when the re-render is slightly delayed.

toContainText() retries with the configured expect timeout (7s for
desktop), ensuring the assertion runs against the updated DOM.

Co-Authored-By: Claude e2e-test-engineer (Sonnet 4.6) <noreply@anthropic.com>
…el change

Fix #1369 (PR #1374) changed the DocumentBrowser "Hide linked documents"
checkbox label to "Hide already-linked documents". The duplicate-link
scenario test used the old regex /hide linked/i which no longer matches,
causing the test to timeout on Desktop, Tablet, and Mobile (all three
@Responsive projects = shards 3, 9, 14).

Update the locator regex to /hide already-linked documents/i. The
checkbox now defaults to unchecked (hideLinked=false after #1369), so
the uncheck() call is a no-op — kept for symmetry.

Co-Authored-By: Claude e2e-test-engineer (Sonnet 4.6) <noreply@anthropic.com>
@steilerDev steilerDev merged commit 4991b21 into beta Apr 28, 2026
27 checks passed
@steilerDev steilerDev deleted the fix/e2e-scenario-tests-retry-assertions branch April 28, 2026 09:54
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.4.2-beta.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.4.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant