sadpandajoe opened a new pull request, #44845:
URL: https://github.com/apache/superset/pull/44845
### SUMMARY
The per-visualization Cypress specs stopped running in #36538, once example
data moved to YAML and broke their hardcoded dataset and slice ids. They were
later deleted as dead code in #40384. This is one of three small PRs that
restore the meaningful parts of that coverage at the right tier, rather than
re-porting each spec one-to-one.
This PR fills the table-chart gaps the old Cypress table spec covered that
no existing unit or RTL test asserts:
- **`TableChart.test.tsx`**:
- With server pagination enabled, clicking a column header pushes `sortBy`
(key and `desc`) through `setDataMask` ownState, and a second click flips the
direction.
- With server pagination disabled, no `sortBy` is pushed.
- **`controlPanel.test.ts`**: `query_mode` raw vs aggregate toggles the
visibility of the raw-mode controls (`all_columns`, `order_by_cols`) and the
aggregate-mode controls (`groupby`, `metrics`, `timeseries_limit_metric`, …).
- **`buildQuery.test.ts`**:
- `timeseries_limit_metric` together with `order_desc` produces the
expected `orderby`.
- The default ordering falls back to the first metric, descending.
- Raw-mode `order_by_cols` are mapped into `orderby`.
The remaining old assertions were dropped because they are already covered:
timestamp format, percent metrics, row limit, and search. The "Value cannot
exceed" tooltip is validator config, and its validators are tested.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (tests only)
### TESTING INSTRUCTIONS
```bash
cd superset-frontend
npm run test -- plugins/plugin-chart-table/test
```
Each new test was checked against a mutation of the source it targets, and
it fails when that behavior is broken.
### 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]