- **Internationalization:** Added end-to-end test `i18n.smoke.spec.ts` to validate Danish locale translations. Ensured normalization and removed unexpected strings in the `da` locale file. - **Orders Table:** Created unit test `orders-table.spec.js` to verify sparse data handling, invoice collection preloading, and rendering correctness. - **Error Handling:** Enhanced connectivity issue UI (`ConnectivityIssue.vue`) with `data-testid` attributes for improved testability. - **E2E Playwright Tests:** Updated and simplified e2e test utilities. Replaced `seedAuthenticatedState` with `primeMockSession` for session preparation. Added new tests for `/user/orders` and `/user/invoices` pages focusing on edge cases and maintaining structure consistency.
19 lines
736 B
TypeScript
19 lines
736 B
TypeScript
import { expect, test } from "@playwright/test";
|
|
import { loginAsUser } from "./fixtures";
|
|
|
|
test("[PAGES][User][/user/invoices] loads the invoices overview", async ({ page }) => {
|
|
await loginAsUser(page);
|
|
await page.goto("/user/invoices");
|
|
|
|
await expect(page).toHaveURL(/\/user\/invoices(?:\/)?(?:[?#].*)?$/);
|
|
await expect(page.locator(".title")).toContainText("Oversigt over fakturaer");
|
|
await expect(page.getByTestId("user-invoices-table")).toBeVisible();
|
|
});
|
|
|
|
test("[PAGES][User][/user/invoices] keeps the current invoice table structure", async ({ page }) => {
|
|
await loginAsUser(page);
|
|
await page.goto("/user/invoices");
|
|
|
|
await expect(page.getByTestId("user-invoices-table").locator("thead th")).toHaveCount(6);
|
|
});
|