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/10/01 00:14:02 UTC

[PR] test(explore): cover viz switch and control dependency logic [superset]

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

   ### SUMMARY
   
   Adds React Testing Library and reducer coverage for how Explore's control panel responds to viz type changes and control dependencies. This change touches test files only.
   
   - **Viz type switch** (`ControlPanelsContainer.test.tsx`)
     - The new tests render the container over the real explore reducers and store, then dispatch a viz type switch to two small registered viz configs.
     - One test checks that the new viz's sections render. It also asserts that the target-only control (`limit`) is created in the store only after the switch.
     - One test checks that shared `metrics` and `groupby` values carry over, and that controls the new viz lacks are dropped.
     - One test checks that standardized metrics and columns reach a target viz whose `formDataOverrides` maps them to different field names.
   - **Control dependencies** (`exploreReducer.test.ts`)
     - `SET_FIELD_VALUE` re-derives the controls listed in `rerender` and leaves the others alone.
     - It re-validates only the controls that declare the changed control in `validationDependencies`.
     - A dependent control's error is raised when the change makes it invalid.
   - **Section filtering** (`getSectionsToRender.test.ts`, new)
     - The datasource and viz type section always comes first.
     - Controls are filtered by datasource type, covering both string and `{ name, config }` control entries.
     - An unregistered viz type falls back to the default sections.
   
   Each new test was checked by breaking the related product code, and the test failed each time.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A: tests only.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npx jest \
     src/explore/components/ControlPanelsContainer.test.tsx \
     src/explore/controlUtils/getSectionsToRender.test.ts \
     src/explore/reducers/exploreReducer.test.ts
   ```
   
   ### 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
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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] test(explore): cover viz switch and control dependency logic [superset]

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

   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] test(explore): cover viz switch and control dependency logic [superset]

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

   **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


Re: [PR] test(explore): cover viz switch and control dependency logic [superset]

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


-- 
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] test(explore): cover viz switch and control dependency logic [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #44842:
URL: https://github.com/apache/superset/pull/44842#issuecomment-5922172619

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/44842?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 81.66%. Comparing base ([`883e43e`](https://app.codecov.io/gh/apache/superset/commit/883e43ee2daca50c92e83d36604f8dd12873434d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`42a53a2`](https://app.codecov.io/gh/apache/superset/commit/42a53a24f34a2102218aa03e321d998c41761108?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #44842   +/-   ##
   =======================================
     Coverage   81.65%   81.66%           
   =======================================
     Files        2977     2977           
     Lines      181253   181253           
     Branches    41873    41873           
   =======================================
   + Hits       148003   148015   +12     
   + Misses      30522    30510   -12     
     Partials     2728     2728           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/44842/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/44842/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.08% <ø> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/44842?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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