sadpandajoe opened a new pull request, #41458: URL: https://github.com/apache/superset/pull/41458
### SUMMARY Migrates the native-filter cross-filter / dependency E2E coverage from the deprecated Cypress suite to the Playwright framework. As with the other dashboard migrations in this series, only **true end-to-end** behaviours (API-created resources rendered in a real browser, asserting real backend round-trips) are migrated. Coverage that is purely client-side modal state is relocated to the React Testing Library component suite, and a small amount of removal-trigger coverage is intentionally narrowed (see ledger). Filter dependencies are configured through the dashboard API (`cascadeParentIds` in `native_filter_configuration`) and the tests then drive **only the filter bar** in the browser. This keeps the tests true E2E while avoiding the deprecated native-filter configuration modal entirely. #### Migrated E2E tests (5) 1. **Dependent filter narrows its options to the selected parent** — selecting a region narrows the dependent country filter's options to exactly the countries in that region. 2. **Dependent filter auto-selects the first item when its parent changes** (`defaultToFirstItem`). 3. **Filter depending on two parents narrows by both selections.** 4. **Applying a value filter re-queries the target chart** — asserts the chart's `POST /api/v1/chart/data` count drops after the filter is applied. 5. **Default filter value is respected after a reload** — revives a previously `it.skip`-ped Cypress case. ### MIGRATION LEDGER Every Cypress case from the source files is classified below. **Bucket 1 — Migrated to Playwright E2E (5):** the five tests above (dependent narrowing, auto-first-item, two-parent dependency, apply-value re-query, default-after-reload). **Bucket 2 — Relocated to component suite, no round-trip lost:** config-modal mechanics that assert client-side state only — add/reorder filters in the config modal, bi-directional dependency prevention (cycle check), numerical range display modes, filter tooltips, undo / restore / cancel, the filter-has-default checkbox, sidebar expand/retract, edit pop-up. These never hit the backend; they are better and faster as RTL component tests. **Bucket 3 — Scope-narrowed, round-trip coverage dropped (2):** `stop filtering when a filter is removed` and `remove parent filters`. These *do* assert a backend round-trip (chart re-queries after a filter is removed), but their only trigger is **deleting a filter through the deprecated config modal** this migration avoids. There is no filter-bar path to reproduce them as true E2E, and under RTL the backend is mocked so the round-trip assertion would be lost. They are therefore a **deliberate scope reduction, flagged here for objection** — if we'd rather keep them, the alternative is a modal-delete helper that drives the deprecated UI. **Covered elsewhere:** `add a new filter` is exercised by the add-filter migration in the sibling PR in this series. **Upstream-skipped:** time-range and column-filter cases were already `it.skip` in the Cypress sources and are not revived here. ### BEFORE/AFTER Before: native-filter dependency coverage lived in the deprecated Cypress suite. After: true E2E dependency coverage runs in Playwright; client-side modal coverage is tracked for the RTL component suite. ### TESTING INSTRUCTIONS ``` cd superset-frontend npx playwright test playwright/tests/dashboard/native-filters.spec.ts ``` ### ADDITIONAL INFORMATION - [ ] Has associated issue - [x] Required feature flags: n/a (native filters are GA) - [ ] Changes UI - [ ] Includes DB Migration - [ ] 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: [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]
