msyavuz opened a new pull request, #41628:
URL: https://github.com/apache/superset/pull/41628

   ### SUMMARY
   
   Two `sharded-jest-tests` suites have been failing on `master` (reproduces on 
every open PR, e.g. #41624/#41625/#41585 — not caused by any of them). Both 
broke because SQL Lab action buttons gained proper accessible names, 
invalidating the tests' role/name queries.
   
   - **TablePreview** (`table actions`): the refresh/view buttons are now named 
by their labels — `Refresh table schema` / `Show CREATE VIEW statement` — 
instead of falling through to the raw icon names (`sync` / `eye`, which now 
belong to the decorative `role="img"` icons). Queries updated to the new names.
   - **SavedQueryList** (`"+ Query"` navigation test): `/query/i` now also 
matches the per-row `Query preview` and `Copy query URL` action buttons, so 
`findByRole('button', { name: /query/i })` throws "found multiple elements". 
Gave the create button a stable `data-test="add-saved-query-button"` and select 
by that.
   
   No production behavior changes — one added `data-test` attribute plus 
test-query updates.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — test-only fix (plus a `data-test` hook).
   
   ### TESTING INSTRUCTIONS
   
   `cd superset-frontend && npm run test -- 
src/SqlLab/components/TablePreview/TablePreview.test.tsx 
src/pages/SavedQueryList/SavedQueryList.test.tsx` — both suites pass.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags: None
   - [ ] Changes UI: No — adds a `data-test` attribute only
   - [ ] Includes DB Migration: No
   - [ ] Introduces new feature or API: No
   - [ ] Removes existing feature or API: No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to