chore: Add visual tests for more components (D-L) - #4852
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4852 +/- ##
=======================================
Coverage 97.66% 97.66%
=======================================
Files 959 959
Lines 31342 31342
Branches 11578 11577 -1
=======================================
Hits 30610 30610
- Misses 686 725 +39
+ Partials 46 7 -39 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds visual regression test definitions for components from Divider through RadioGroup.
Changes:
- Adds 19 component visual test suites covering permutations, responsive layouts, and interactions.
- Registers the suites in the central definitions index.
- Requires Jest runner entrypoints and a HelpPanel focus setup fix.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Summary |
|---|---|
test/definitions/visual/radio-group.ts |
Radio group visual scenarios |
test/definitions/visual/progress-bar.ts |
Progress bar variants |
test/definitions/visual/pagination.ts |
Pagination permutations |
test/definitions/visual/link.ts |
Link permutations and styles |
test/definitions/visual/input.ts |
Input permutations |
test/definitions/visual/icon.ts |
Icon variants and sizing |
test/definitions/visual/help-panel.ts |
Help panel scenarios; focus setup targets missing inputs and times out |
test/definitions/visual/header.ts |
Responsive header scenarios |
test/definitions/visual/grid.ts |
Responsive grid scenarios |
test/definitions/visual/form.ts |
Form scenarios |
test/definitions/visual/form-field.ts |
Responsive form-field scenarios |
test/definitions/visual/flashbar.ts |
Flashbar scenarios |
test/definitions/visual/flashbar-stacked.ts |
Stacked Flashbar scenarios |
test/definitions/visual/file-upload.ts |
File upload permutations |
test/definitions/visual/file-token-group.ts |
File token permutations |
test/definitions/visual/file-input.ts |
File input scenario |
test/definitions/visual/file-dropzone.ts |
File dropzone scenario |
test/definitions/visual/error-boundary.ts |
Error boundary fallback states |
test/definitions/visual/divider.ts |
Divider permutations |
test/definitions/index.ts |
Central suite registration; Jest runner entrypoints are missing |
Suppressed comments (2)
test/definitions/visual/help-panel.ts:23
focusInputs()waits for a visible nativeinputbefore dispatching focus events, but this AppLayout page renders no input elements. The setup will therefore time out before the screenshot is captured; remove this setup or target an element that the page actually renders.
setup: async ({ page }) => {
await page.focusInputs();
},
test/definitions/visual/help-panel.ts:31
focusInputs()waits for a visible nativeinputbefore dispatching focus events, but this loading AppLayout page renders no input elements. The setup will therefore time out before the screenshot is captured; remove this setup or target an element that the page actually renders.
setup: async ({ page }) => {
await page.focusInputs();
},
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| await page.click(TEST_CHART_FILTER_TRIGGER); | ||
| await page.keys(['Escape']); | ||
| await page.focusNextElement(); | ||
| await page.keys(['ArrowRight', 'ArrowDown', 'ArrowRight']); |
There was a problem hiding this comment.
would this require rtl guard like the one above?
There was a problem hiding this comment.
Right —the original test did not have it, but I think it should. Same with some other tests, from here and from bar chart, which I just updated accordingly in the last commit.
Description
Ticket: D417180663
How has this been tested?
Manually compared Allure report output against internal one for each component
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.