Add jobs view integration tests for selection, pinning and classification - #9804
Open
camd wants to merge 2 commits into
Open
Add jobs view integration tests for selection, pinning and classification#9804camd wants to merge 2 commits into
camd wants to merge 2 commits into
Conversation
…tion Extract the API fixture mocks from jobs_view.spec.js into a shared mockJobsApi.js helper, extended with a logged-in mode and capture of POSTs to the note and bug-job-map endpoints. New coverage: - job_selection.spec.js: selectedTaskRun deep links, n/p and arrow-key navigation, escape clearing the selection, and browser back after selecting a job - pinboard_classification.spec.js: pinning via spacebar, the details panel pin button and the push header pin-all button, adding a related bug with the b shortcut, the logged-out save error, and a full logged-in classification asserting the API payloads - jobs_view.spec.js: the u unclassified-failures filter toggle and searchStr deep links
✅ Deploy Preview for treeherder ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Serve the bug_suggestions.json fixture through the shared mock helper (new bugSuggestions option) and cover the wiring from a selected failed job through the failure summary tab to the pinboard: - the failure summary is the default tab for a failed job and renders the failure line with its suggested bugs - pinning a suggested bug pins the job with the bug attached - a logged-in user can classify from a suggested bug, asserting the note and bug-job-map API payloads
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.
We've had a few navigation regressions in the jobs view, so this adds more Playwright integration coverage there — particularly around job selection and the pinning / classification flow.
Changes
mockJobsApi.js— extracts the API fixture mocking fromjobs_view.spec.jsinto a shared helper so all jobs-view specs can use it. Extended with:seedLoggedInSession()+user: [SHERIFF_USER])/note/and/bug-job-map/so tests can assert what would be written to the backendjob_selection.spec.js(new, 5 tests)selectedTaskRunselects the job on loadn/pstep through unclassified failures (skipping already-classified jobs) with the URL updating at each steppinboard_classification.spec.js(new, 6 tests)bshortcut opens the related-bug input and adds a bug chip/note/and/bug-job-map/POST payloads and that the pinboard clears afterwardsjobs_view.spec.js(+2 tests): theuunclassified-failures filter toggle, andsearchStrdeep links applying the filter on initial loadfailure_summary.spec.js(new, 3 tests) — the suggestions themselves are backend logic covered by pytest (tests/model/test_error_summary.py); these cover the frontend wiring using thebug_suggestions.jsonfixture:Notes
pushState), so a single browser-back does not deselect. The back-button test loopsgoBack()with a comment for now; once that is fixed the test can be tightened to a singlegoBack()..first().hasTextis case-insensitive substring matching (the classified icon's "classified" title text made'D'match the Cpp button), so job symbols are matched with anchored regexes like/^B$/.Testing
pnpm test:integration: all 35 tests pass (22 jobs-view tests, run with--repeat-each=2locally to check for flakiness)pnpm lintclean