Files
pleno-vue/tests/e2e/userInvoices.spec.ts
T
Jeppe Bundgaard b39b458f4f Add .prettierrc.json and refactor test files for improved formatting consistency:
- Introduced `.prettierrc.json` to enforce consistent code formatting across the project.
- Updated unit and e2e test files to address formatting issues, improve readability, and ensure alignment with the new Prettier configuration.
2026-04-13 09:13:27 +02:00

40 lines
1.3 KiB
TypeScript

import { test, expect } from "@playwright/test";
import { userCredentials, loginAsUser } from "./fixtures";
/** User invoices Tests */
// User invoices page content tests
test("[PAGES][User][/user/invoices] should load the page", async ({ page }) => {
await loginAsUser(page);
await page.goto("/user/invoices");
await expect(page).toHaveURL(/invoices/);
});
test("[PAGES][User][/user/invoices] should display the title", async ({ page }) => {
await loginAsUser(page);
await page.goto("/user/invoices");
await expect(page.locator(".title")).toContainText("Oversigt over fakturaer");
});
// Invoices table tests
test("[PAGES][User][/user/invoices] should display the invoices table", async ({ page }) => {
await loginAsUser(page);
await page.goto("/user/invoices");
await expect(page.locator("table.is-fullwidth")).toBeVisible();
});
test("[PAGES][User][/user/invoices] should show empty invoices list", async ({ page }) => {
await loginAsUser(page);
await page.goto("/user/invoices");
await expect(page.locator("tbody tr")).toHaveCount(0);
});
test("[PAGES][User][/user/invoices] should display table headers", async ({ page }) => {
await loginAsUser(page);
await page.goto("/user/invoices");
await expect(page.locator("thead th")).toHaveCount(6);
});
// TODO: tests for pagination, search, download, details, mobile, etc.
// ...