Files
openobserve/tests/ui-testing/playwright-tests/Reports
ktx-akshay fa3d294999 test(reports): e2e regression coverage for dashboard scheduled reports drawer (#13569) (#13781)
## What

Adds E2E regression coverage for the dashboard **Scheduled Reports
drawer**, verifying the two
bugs fixed in #13569.

No production code is touched — this is test-only.

## Why

#13569 (`fix: dashboard reports drawer duplicates entries and hides
reports in custom folders`)
shipped with unit-test updates only. The drawer had no E2E coverage at
all, so both regressions
could return unnoticed.

| Bug | Root cause | Fix under test |
|-----|-----------|----------------|
| **1. Rows duplicate on reopen** | `scheduledReports` was seeded with
the `reports` prop and `formatReports()` pushed onto it, mutating the
prop. The drawer stays mounted between opens, so each reopen multiplied
the rows. | `ScheduledDashboards.vue` now rebuilds the array with
`.map()` |
| **2. Custom-folder reports hidden** | `reports.list(org, folderId,
dashboardId)` passed the **dashboard's** folder, but `folder_id` filters
by the **report's own** folder | `ViewDashboard.vue` passes `""` so
`folder_id` is omitted |

## Tests added — 9, all passing


`tests/ui-testing/playwright-tests/Reports/scheduledReportsDrawer.spec.js`

| # | Test | Covers |
|---|------|--------|
| 1 | P0: Drawer opens and lists the dashboard's cached report |
baseline |
| 2 | P0: Bug 13569-1 — reopening the drawer does not duplicate rows |
**bug 1** — exact row count across 3 close/reopen cycles |
| 3 | P0: Bug 13569-2 — report saved in a custom report folder is listed
| **bug 2** — report in custom folder, dashboard in default folder |
| 4 | P1: Reports list request omits `folder_id` | **bug 2** — pins the
network contract the fix changed |
| 5 | P1: Switching tabs re-filters the list without duplicating rows |
`filterReports()`, the second path bug 1 corrupted |
| 6 | P1: Search filter does not survive a reopen or leave stale rows |
filter + rebuild interaction |
| 7 | P2: Dashboard with no reports shows the empty state on every open
| empty state across reopen |
| 8 | P2: A report bound to another dashboard is not listed | guards
against over-correcting bug 2 (`dashboard_id` scoping must survive) |
| 9 | Cleanup: Remove all test resources via API | teardown |
2026-08-12 11:01:49 +00:00
..