test: add portal end-to-end quality gates
This commit is contained in:
1 parent
f7481d4cde
commit
9c0d43b1ec
10 files changed
+609
-123
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import { test, expect } from "./fixtures";
|
||||
|
||||
test.describe("Billing Reports Administration", () => {
|
||||
test("redirects unauthenticated user from billing admin pages", async ({ page }) => {
|
||||
await page.goto("/admin/abrechnungen");
|
||||
await expect(page).toHaveURL(/\/anmelden/);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import { test, expect } from "./fixtures";
|
||||
|
||||
test.describe("Usage Accounting and Download Flow", () => {
|
||||
test("shows login page for unauthenticated access to photo catalog", async ({ page }) => {
|
||||
await page.goto("/redaktion/alben");
|
||||
await expect(page).toHaveURL(/\/anmelden/);
|
||||
await expect(page.getByRole("button", { name: /Anmelden/i })).toBeVisible();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
/* eslint-disable react-hooks/rules-of-hooks */
|
||||
import { test as base } from "@playwright/test";
|
||||
|
||||
export type EditorialFixture = {
|
||||
organizationName: string;
|
||||
name: string;
|
||||
email: string;
|
||||
password: string;
|
||||
street: string;
|
||||
postalCode: string;
|
||||
city: string;
|
||||
countryCode: string;
|
||||
};
|
||||
|
||||
export const editorialFixture: EditorialFixture = {
|
||||
organizationName: "Suddeutsche Zeitung",
|
||||
name: "Redaktion Sport",
|
||||
email: "sport@sz-example.de",
|
||||
password: "SecurePassword123!",
|
||||
street: "Sendlinger Str. 8",
|
||||
postalCode: "80331",
|
||||
city: "Munchen",
|
||||
countryCode: "DE",
|
||||
};
|
||||
|
||||
export const test = base.extend<{
|
||||
editorialData: EditorialFixture;
|
||||
}>({
|
||||
editorialData: async ({}, use) => {
|
||||
await use(editorialFixture);
|
||||
},
|
||||
});
|
||||
|
||||
export { expect } from "@playwright/test";
|
||||
@@ -0,0 +1,21 @@
|
||||
import { test, expect } from "./fixtures";
|
||||
|
||||
test.describe("B2B Editorial Registration and Approval Flow", () => {
|
||||
test("user can register and views pending status page", async ({ page, editorialData }) => {
|
||||
await page.goto("/registrieren");
|
||||
|
||||
await page.getByLabel("Organisation / Redaktion").fill(editorialData.organizationName);
|
||||
await page.getByLabel("Ansprechpartner / Name").fill(editorialData.name);
|
||||
await page.getByLabel("E-Mail-Adresse").fill(editorialData.email);
|
||||
await page.getByLabel("Passwort", { exact: true }).fill(editorialData.password);
|
||||
await page.getByLabel("Passwort wiederholen").fill(editorialData.password);
|
||||
await page.getByLabel("Straße und Hausnummer").fill(editorialData.street);
|
||||
await page.getByLabel("Postleitzahl").fill(editorialData.postalCode);
|
||||
await page.getByLabel("Ort / Stadt").fill(editorialData.city);
|
||||
|
||||
await page.getByRole("button", { name: /Konto erstellen/i }).click();
|
||||
|
||||
await expect(page).toHaveURL(/\/registrieren\/bestaetigt/);
|
||||
await expect(page.getByText(/Freischaltung ausstehend|ausstehend/i)).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user