You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/03/24 22:34:25 UTC

[PR] fix(tests): resolve flakey SouthPane extension test caused by nwsapi [superset]

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

   ### SUMMARY
   
   The SouthPane extension contract test "renders slot-wide toolbar actions via PanelToolbar" fails intermittently in CI.
   
   **Root cause:** `screen.getByRole('button', { name: ... })` triggers `dom-accessibility-api` to compute accessible names by traversing the DOM. When it encounters antd Tabs' overflow "more" button, it evaluates a CSS selector containing `:focus-visible` — a pseudo-class that jsdom's nwsapi engine cannot parse — causing a `SyntaxError`.
   
   **Fix:** Replace `getByRole('button', { name })` with `getByLabelText(name)` in the two affected assertions. `getByLabelText` queries the `aria-label` attribute directly without triggering CSS selector evaluation via nwsapi. The PanelToolbar component renders buttons with `aria-label={command.title}`, so the assertions remain semantically equivalent.
   
   Also removes a leftover debug `console.log` and a stale comment referencing the old `{ hidden: true }` query option.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — test-only change.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npx jest --no-coverage src/SqlLab/components/SouthPane/SouthPane.test.tsx
   ```
   
   All 7 tests should pass, including:
   - "renders slot-wide toolbar actions via PanelToolbar"
   - "renders per-view toolbar actions for contributed tab"
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(tests): resolve flakey SouthPane extension test caused by nwsapi [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe merged PR #38832:
URL: https://github.com/apache/superset/pull/38832


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(tests): resolve flakey SouthPane extension test caused by nwsapi [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38832:
URL: https://github.com/apache/superset/pull/38832#issuecomment-4121851313

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(tests): resolve flakey SouthPane extension test caused by nwsapi [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #38832:
URL: https://github.com/apache/superset/pull/38832#issuecomment-4121857315

   ## **Sequence Diagram**
   
   This PR updates SouthPane extension tests to locate toolbar buttons by aria label instead of role and accessible name computation. The new query path reads labels directly from rendered buttons, avoiding the flaky selector parsing path in the test environment.
   
   ```mermaid
   sequenceDiagram
       participant JestTest as Jest Test
       participant SouthPane as SouthPane
       participant TestingLibrary as Testing Library
       participant DOM
   
       JestTest->>SouthPane: Render SouthPane with registered toolbar actions
       SouthPane-->>DOM: Render toolbar buttons with aria labels
       JestTest->>TestingLibrary: Query Panels Action by label text
       TestingLibrary->>DOM: Match button by aria label
       DOM-->>JestTest: Return Panels Action button
       JestTest->>TestingLibrary: Query Per View Action by label text
       TestingLibrary->>DOM: Match button by aria label
       DOM-->>JestTest: Return Per View Action button
   ```
   
   ---
   *Generated by [CodeAnt AI](https://codeant.ai)*
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(tests): resolve flakey SouthPane extension test caused by nwsapi [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #38832:
URL: https://github.com/apache/superset/pull/38832#issuecomment-4128209912

   **Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org