Repository navigation
TEST: History pagination race - #4014
Open
Roman Lutz (romanlutz) wants to merge 3 commits into
Open
Roman Lutz (romanlutz) wants to merge 3 commits into
Roman Lutz (romanlutz) wants to merge 3 commits into
Conversation
Wait for settled pagination, keep filter rerenders on the same component, and exercise deferred responses with preserved cursor/filter assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> # Conflicts: # frontend/src/components/History/ScenarioHistory.test.tsx
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the test-only improvements to Scenario History pagination coverage.
No open issues 🎉
What changed in this PR
This test-only change makes Scenario History pagination coverage deterministic without changing production behavior.
Changes:
- Uses deferred responses to verify loading states before asserting settled pagination and distinct results.
- Preserves the component tree during filter changes, checking cursor reset and refreshed results with filters retained.
| File | Description |
|---|---|
frontend/src/components/History/ScenarioHistory.test.tsx |
Repairs pagination readiness waits and strengthens filter-change and refresh assertions. |
Review effort: Balanced
This branch has not been deployed
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
Repair the Scenario History pagination test's readiness race. The old wait observed
listRunsdispatch, not response settlement, so it could assertPage 2while pagination was intentionally hidden during loading. Its filter rerender also removed the original<main>wrapper, remounting the component instead of checking retained state.Use the existing deferred-response helper to exercise the pending and settled states deterministically. Keep the same component tree during filter changes and retain assertions for serialized filters, the supplied next-page cursor, visible Page 2 and its distinct result, first-page cursor reset, and refreshed results with filters preserved.
This is a test-only repair, not a proved production pagination defect. No production source or user-facing behavior changes. Preserve the QUEUED-only URL coverage from #3815 and include latest upstream main through #3526. Independent review found no actionable issues, including a final check after the upstream refresh.
Tests and Documentation
Validated final head
cc7b75c17b96956dac9d53f550cde643b23d8a35, merged with upstream main0f5f6589e92824268b5151409ad19c8593e1dc5a:npm --prefix frontend test -- --runInBand --runTestsByPath src\components\History\ScenarioHistory.test.tsx --testNamePattern='serializes filters, paginates by cursor, and refreshes from the first page': passed, 1 selected test and 32 skipped, without Reactactwarnings.npm --prefix frontend test -- --runInBand --testPathPatterns='components.History' --silent: passed, 143 tests across 7 suites.Set-Location frontend; npm exec -- eslint src\components\History\ScenarioHistory.test.tsx --report-unused-disable-directives --max-warnings 0: passed.npm run type-checkfromfrontend: passed.git diff --checkandgit diff --check origin/main...HEAD: passed.Documentation and JupyText are not applicable to this frontend test-only change. No provider or model calls were made.