Skip to content

[scanner] fix: update tests for isomorphic-dompurify 3.18.0 compatibility#19412

Merged
clubanderson merged 1 commit into
mainfrom
scanner/fix-19408
Jun 22, 2026
Merged

[scanner] fix: update tests for isomorphic-dompurify 3.18.0 compatibility#19412
clubanderson merged 1 commit into
mainfrom
scanner/fix-19408

Conversation

@clubanderson

Copy link
Copy Markdown
Collaborator

Fixes #19408

Updates 5 failing tests to be compatible with the isomorphic-dompurify 3.18.0 bump merged in #19395.

Changes

releaseNotesComponents.test.tsx

  • Updated heading component test to check role="heading" and aria-level attributes instead of tagName
  • This correctly validates the <div role="heading"> elements used in the source

ListVisualization.test.tsx & TableVisualization.test.tsx

  • Updated pagination button disabled tests to check aria-disabled attribute instead of .disabled property
  • This correctly validates the <div role="button"> elements used for pagination controls

All test changes align with the actual component implementations - no source code was changed, only test assertions were corrected.

- Update heading component tests to check role and aria-level instead of tagName
- Update pagination button tests to check aria-disabled attribute instead of disabled property
- Fixes compatibility issues introduced by isomorphic-dompurify 3.18.0 upgrade

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Scanner Bot <scanner@kubestellar.io>
Copilot AI review requested due to automatic review settings June 22, 2026 15:34
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jun 22, 2026
@netlify

netlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 21db29d
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a3955f59b618d00089cfca4
😎 Deploy Preview https://deploy-preview-19412.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign eeshaansa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions

Copy link
Copy Markdown
Contributor

🐝 Hi @clubanderson! I'm kubestellar-hive[bot], an automation bot for this repo.

Trusted users — org members and contributors with write access — can mention @kubestellar-hive in a comment to trigger repo automation.
On issues, that mention queues an automated fix attempt. On pull requests, it records extra context for existing automation.
This is not an interactive Q&A bot, so mentions should be treated as requests for automation rather than a conversation.

Automation may take a moment to start, and follow-up happens through workflow activity rather than chat replies.

@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates unit tests in the web UI to match the actual rendered accessibility semantics after the isomorphic-dompurify 3.18.0 bump (no production component logic changes).

Changes:

  • Adjusts markdown heading component tests to validate role="heading" and aria-level instead of DOM tag names.
  • Updates pagination “disabled” assertions in list/table visualization tests to check aria-disabled rather than the .disabled property.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
web/src/lib/markdown/tests/releaseNotesComponents.test.tsx Updates heading assertions to reflect div role="heading" + aria-level output.
web/src/lib/unified/card/visualizations/tests/ListVisualization.test.tsx Updates pagination disabled assertions to use aria-disabled.
web/src/lib/unified/card/visualizations/tests/TableVisualization.test.tsx Updates pagination disabled assertions to use aria-disabled.

Comment on lines 259 to +263
it('disables prev button on first page', () => {
renderTable({ pageSize: PAGE_SIZE })
const buttons = screen.getAllByRole('button')
const prevButton = buttons[0]
expect(prevButton).toHaveProperty('disabled', true)
expect(prevButton.getAttribute('aria-disabled')).toBe('true')
Comment on lines 277 to +280
// Refresh buttons reference after re-renders
const updatedButtons = screen.getAllByRole('button')
const updatedNext = updatedButtons[updatedButtons.length - 1]
expect(updatedNext).toHaveProperty('disabled', true)
expect(updatedNext.getAttribute('aria-disabled')).toBe('true')
Comment on lines 199 to +203
it('disables prev button on first page', () => {
renderList({ pageSize: PAGE_SIZE })
const buttons = screen.getAllByRole('button')
const prevButton = buttons[buttons.length - 2]
expect(prevButton).toHaveProperty('disabled', true)
expect(prevButton.getAttribute('aria-disabled')).toBe('true')
Comment on lines 218 to +221
// Re-query buttons after re-render
const updatedButtons = screen.getAllByRole('button')
const updatedNext = updatedButtons[updatedButtons.length - 1]
expect(updatedNext).toHaveProperty('disabled', true)
expect(updatedNext.getAttribute('aria-disabled')).toBe('true')
Comment on lines +82 to 86
const { unmount } = render(<Comp>{`heading-${level}`}</Comp>)
const element = screen.getByText(`heading-${level}`)
expect(element.getAttribute('role')).toBe('heading')
expect(element.getAttribute('aria-level')).toBe(String(level))
unmount()
@clubanderson clubanderson merged commit 2594b01 into main Jun 22, 2026
41 of 48 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the scanner/fix-19408 branch June 22, 2026 16:00
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions

Copy link
Copy Markdown
Contributor

✅ Post-Merge Verification: passed

Commit: 2594b01022dd36ab3ed6f2d736caf35dc522ccdf
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/27966182603

@github-actions

Copy link
Copy Markdown
Contributor

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit 2594b01022dd36ab3ed6f2d736caf35dc522ccdf.

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

Labels

ai-generated Pull request generated by AI dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tier/1-lightweight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 5 test failure(s) in Coverage Suite run #3849

2 participants