Skip to content

Commit fc22e1c

Browse files
committed
Update scoped reporting e2e verification
1 parent 25fc75e commit fc22e1c

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

docs/superpowers/plans/2026-07-03-scoped-report-runs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- [x] Task 3: Report Scope Controls
1111
- [x] Task 4: Session Snapshots And Dataset Management
1212
- [x] Task 5: Generic Comparison Dashboard Cards
13-
- [ ] Task 6: Final Verification And E2E
13+
- [x] Task 6: Final Verification And E2E
1414

1515
**Architecture:** Scope is modeled in `src/domain/types.ts` and validated in a small domain helper. The client sends one scoped period run per request to `/api/reports/run`; the server runner applies pagination/date limits and returns snapshot metadata. Session state stores current and comparison snapshots, while the report workspace and Datasets panel render those snapshots.
1616

e2e/reporting-mvp.spec.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { expect, test } from "@playwright/test";
22

3-
test("reporting MVP shell supports catalog, credentials, and uploads", async ({ page }) => {
3+
test("reporting MVP shell supports catalog, scoped runs, credentials, uploads, and datasets", async ({ page }) => {
44
await page.goto("/");
55

66
await expect(page.getByRole("heading", { name: "Stack API Utilities" })).toBeVisible();
77
await expect(page.getByRole("button", { exact: true, name: "Tag Report" })).toBeVisible();
8-
await expect(page.getByRole("button", { name: "Run Tag Report" })).toBeVisible();
8+
await expect(page.getByRole("button", { name: "Run current period" })).toBeVisible();
9+
await page.getByLabel("Enable comparison period").click();
10+
await expect(page.getByRole("button", { name: "Run comparison period" })).toBeVisible();
11+
await expect(page.getByRole("button", { name: "Run both periods" })).toBeVisible();
912

1013
await page.getByRole("button", { name: "Credentials" }).click();
1114
await expect(page.getByRole("heading", { name: "Session Credentials" })).toBeVisible();
@@ -14,4 +17,8 @@ test("reporting MVP shell supports catalog, credentials, and uploads", async ({
1417
await page.getByRole("button", { name: "Uploads" }).click();
1518
await expect(page.getByRole("heading", { name: "Uploads" })).toBeVisible();
1619
await expect(page.getByLabel("Upload report outputs")).toBeVisible();
20+
21+
await page.getByRole("button", { name: "Datasets" }).click();
22+
await expect(page.getByRole("heading", { name: "Datasets" })).toBeVisible();
23+
await expect(page.getByText("No datasets loaded in this browser session.")).toBeVisible();
1724
});

playwright.config.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import { defineConfig, devices } from "@playwright/test";
22

3+
const host = "127.0.0.1";
4+
const port = process.env.PORT ?? "5180";
5+
const baseURL = `http://${host}:${port}`;
6+
37
export default defineConfig({
48
testDir: "./e2e",
59
use: {
6-
baseURL: "http://127.0.0.1:5180",
10+
baseURL,
711
trace: "retain-on-failure",
812
},
913
webServer: {
10-
command: "pnpm exec next dev -H 127.0.0.1 -p 5180",
11-
url: "http://127.0.0.1:5180",
14+
command: `./node_modules/.bin/next dev -H ${host} -p ${port}`,
15+
url: baseURL,
1216
reuseExistingServer: !process.env.CI,
1317
},
1418
projects: [

0 commit comments

Comments
 (0)