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

   ### SUMMARY
   
   Migrates the genuine end-to-end case from the legacy Cypress **Dashboard 
top-level controls** suite (`dashboard/controls.test.ts`) to the existing 
Playwright framework, as part of the dashboard Cypress→Playwright migration.
   
   The suite had two cases:
   - **`should allow dashboard level force refresh`** — a true E2E behaviour: 
the dashboard-level force refresh must re-query every chart with `force=true`, 
bypassing the cache. **Migrated here.**
   - **`should allow chart level refresh`** — only asserted the menu item's 
`ant-dropdown-menu-item-disabled` class with no backend round-trip, and was 
already `it.skip`-ped as flaky. It belongs in component/RTL coverage and is 
**not** migrated.
   
   Design decisions:
   - The dashboard is built from scratch via the API (`testWithAssets` 
fixture), so the test is hermetic, self-cleaning, and deterministic. Initial 
load warms the cache; the force refresh must then bypass it.
   - The test inspects the real `POST /api/v1/chart/data?...&force=true` 
round-trips and asserts each one returns `200` with a freshly computed 
(uncached) result. The backend reports an uncached result as a falsy 
`is_cached` (it returns `null` in current master; the legacy Cypress test 
asserted `=== false`), whereas a cached result reports `true` — so the 
assertion is `is_cached` is falsy, which fails correctly if force refresh ever 
serves stale cache.
   - Adds `DashboardPage.forceRefresh()`, a reusable page-object method that 
triggers the force refresh through the header actions menu.
   
   ### TESTING INSTRUCTIONS
   
   ```
   cd superset-frontend
   PLAYWRIGHT_BASE_URL=http://localhost:8088 npx playwright test 
--project=chromium dashboard/dashboard-controls.spec.ts
   ```
   
   Verified locally against a running Superset stack (passes in ~7s).
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] 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]

Reply via email to