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

   ### SUMMARY
   
   Adds React Testing Library coverage for the cartodiagram controls and a set 
of small Explore control primitives that had no tests. This change touches test 
files only.
   
   - **Cartodiagram controls**
     - `ZoomConfigControl`: switching shape recomputes the per-zoom values 
(checked against literal expected sizes), and editing the base values.
     - `ZoomConfigsChart`: drag handles sit at the bar ends. Dragging maps 
pixel positions back through the chart, and dragging left of the axis clamps to 
zero. `echarts.init` is replaced with a fake chart that uses an invertible 
pixel transform.
     - `MapViewControl` and `MapViewPopoverContent`: switching mode, the extent 
label, and saving a custom extent.
     - `LayerConfigsControl`: add, edit, remove and close through the real 
popover, using a WMS layer. Edits keep the layer's type, version and layers 
parameter.
   - **Primitive controls** (all new): `SwitchControl`, `SliderControl` 
(including keyboard bounds), `VerticalRadioControl`, `XAxisSortControl`, 
`TimeRangeControl`, `CustomListItem` and `ViewQueryModalFooter`.
   
   Each new test was checked by breaking the related product code, and the test 
failed each time.
   
   Some behavior that looks like a bug was left unpinned on purpose:
   - `XAxisSortControl` copies `value` into local state once, so a value change 
from the parent is ignored.
   - `MapViewControl` shows a zoom, latitude or longitude of `0` as unset.
   - The `css` prop on `CustomListItem` renders as `css="[object Object]"`, so 
its selectable styles never apply.
   - The `ZoomConfigControl` base-value handlers mutate the nested `configs` of 
the `value` prop.
   - One click on `RadioButtonControl` calls `onChange` twice.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A: tests only.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npx jest \
     src/explore/components/controls/ZoomConfigControl \
     src/explore/components/controls/MapViewControl \
     src/explore/components/controls/LayerConfigsControl \
     src/explore/components/controls/SwitchControl.test.tsx \
     src/explore/components/controls/SliderControl.test.tsx \
     src/explore/components/controls/VerticalRadioControl.test.tsx \
     src/explore/components/controls/XAxisSortControl.test.tsx \
     src/explore/components/controls/TimeRangeControl \
     src/explore/components/controls/CustomListItem \
     src/explore/components/controls/ViewQueryModalFooter.test.tsx
   ```
   
   ### 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: [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