Skip to content

test(dashboard): fix filter-delete queries broken by aria-label rename#41781

Closed
rusackas wants to merge 1 commit into
masterfrom
fix/filters-config-modal-remove-filter-name
Closed

test(dashboard): fix filter-delete queries broken by aria-label rename#41781
rusackas wants to merge 1 commit into
masterfrom
fix/filters-config-modal-remove-filter-name

Conversation

@rusackas

@rusackas rusackas commented Jul 6, 2026

Copy link
Copy Markdown
Member

SUMMARY

#41742 (merged 2026-07-03) fixed the filter icons to use a real aria-label instead of the non-functional alt prop, which changed the delete icon's accessible name from delete to "Remove filter" — but didn't update the two FiltersConfigModal tests that query the button by its accessible name. Since then, sharded-jest-tests (5) fails deterministically on any PR whose CI runs it (observed on #41780 and others):

TestingLibraryElementError: Unable to find an accessible element with the role "button" and name /delete/i
  Name "Remove filter": <span aria-label="Remove filter" data-test="delete" ... />

Two-line fix: update the getByRole('button', { name: ... }) queries in restores a deleted filter via the "Restore filter" button and undoes a filter deletion via the sidebar "Undo?" link to /remove filter/i.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A — test-only.

TESTING INSTRUCTIONS

cd superset-frontend && npx jest src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx

26 passed, 1 skipped (pre-existing skip) locally.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

#41742 changed the filter delete icon's accessible name from the alt
text "delete" to aria-label "Remove filter" but did not update the two
FiltersConfigModal tests querying the button by name, so sharded jest
shard 5 fails on every PR. Update the role queries to the new name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dosubot dosubot Bot added the dashboard:native-filters Related to the native filters of the Dashboard label Jul 6, 2026
@bito-code-review

bito-code-review Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #ddc012

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 82d2d76..82d2d76
    • superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@netlify

netlify Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 82d2d76
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a4b16537f0093000886850b
😎 Deploy Preview https://deploy-preview-41781--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@rusackas

rusackas commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@sadpandajoe mind a quick look? Two-line test fix, but it unblocks sharded-jest-tests (5) for every open PR... it's been failing since #41742 landed on Thursday.

@hainenber

Copy link
Copy Markdown
Contributor

@rusackas you might want to update master branch. I've landed a fix here ;D

@rusackas

rusackas commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

As it turns out, #41774 landed the same fix this morning (via REMOVE_FILTER_BUTTON_REGEX), so master's shard 5 is already unblocked. Closing as superseded... no action needed @sadpandajoe, sorry for the ping!

@rusackas rusackas closed this Jul 6, 2026
@rusackas rusackas deleted the fix/filters-config-modal-remove-filter-name branch July 6, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard:native-filters Related to the native filters of the Dashboard size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants