23 lines
718 B
TypeScript
23 lines
718 B
TypeScript
import { test } from "@playwright/test";
|
|
import { expectPageRedirectsToLogin } from "../helpers/auth-assertions.ts";
|
|
|
|
test.describe("Financial Calendar Route Guards", () => {
|
|
test("monthly calendar route requires authentication", async ({ request }) => {
|
|
const now = new Date();
|
|
const year = now.getFullYear();
|
|
const month = String(now.getMonth() + 1).padStart(2, "0");
|
|
|
|
await expectPageRedirectsToLogin(
|
|
request,
|
|
`/calendar/financial-calendar/${year}/${month}`,
|
|
);
|
|
});
|
|
|
|
test("calendar route keeps query params in return_path", async ({ request }) => {
|
|
await expectPageRedirectsToLogin(
|
|
request,
|
|
"/calendar/financial-calendar/2026/02?view=month",
|
|
);
|
|
});
|
|
});
|