Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export function WindowControls({
name="start"
defaultValue={window.start}
key={window.start}
autoComplete="off"
required
/>
</label>
Expand All @@ -139,6 +140,7 @@ export function WindowControls({
name="end"
defaultValue={window.end}
key={window.end}
autoComplete="off"
required
/>
</label>
Expand Down
16 changes: 16 additions & 0 deletions tests/dashboard.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ test("preset and custom date windows survive navigation", async ({
/start=2026-08-01.*end=2026-08-07/,
);
});
test("date inputs match the window after Back to the default", async ({
app,
screen,
browser,
}) => {
await app.open("/team");
await screen.getByLabel("Start", { exact: true }).fill("2026-10-01");
await screen.getByLabel("End", { exact: true }).fill("2026-10-31");
await screen.getByRole("button", "Apply dates").tap();
await expect(browser).toHaveURL(/start=2026-10-01.*end=2026-10-31/);
await app.open("/team?start=2026-10-01&end=2026-10-31");
await browser.back();
await expect(browser).toHaveURL(/\/team$/);
await expect(screen.getByLabel("Start", { exact: true })).not.toHaveValue("2026-10-01");
await expect(screen.getByLabel("End", { exact: true })).not.toHaveValue("2026-10-31");
});
test("review and DAG filters use URL state", async ({
app,
screen,
Expand Down
Loading