- Brand/Theming: Marketing-Farb- und Typographievariablen in `resources/css/app.css` eingeführt, AdminLayout, Dashboardkarten und Onboarding-Komponenten entsprechend angepasst; Dokumentation (`docs/todo/tenant-admin-onboarding-fusion.md`, `docs/changes/...`) aktualisiert. - Checkout & Payments: Checkout-, PayPal-Controller und Tests für integrierte Stripe/PayPal-Flows sowie Paket-Billing-Abläufe überarbeitet; neue PayPal SDK-Factory und Admin-API-Helper (`resources/js/admin/api.ts`) schaffen Grundlage für Billing/Members/Tasks-Seiten. - DX & Tests: Neue Playwright/E2E-Struktur (docs/testing/e2e.md, `tests/e2e/tenant-onboarding-flow.test.ts`, Utilities), E2E-Tenant-Seeder und zusätzliche Übersetzungen/Factories zur Unterstützung der neuen Flows. - Marketing-Kommunikation: Automatische Kontakt-Bestätigungsmail (`ContactConfirmation` + Blade-Template) implementiert; Guest-PWA unter `/event` erreichbar. - Nebensitzung: Blogsystem gefixt und umfassenden BlogPostSeeder für Beispielinhalte angelegt.
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import { test as base, expect, Page } from '@playwright/test';
|
|
|
|
export type TenantCredentials = {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
|
|
export type TenantAdminFixtures = {
|
|
tenantAdminCredentials: TenantCredentials | null;
|
|
signInTenantAdmin: () => Promise<void>;
|
|
};
|
|
|
|
const tenantAdminEmail = process.env.E2E_TENANT_EMAIL;
|
|
const tenantAdminPassword = process.env.E2E_TENANT_PASSWORD;
|
|
|
|
export const test = base.extend<TenantAdminFixtures>({
|
|
tenantAdminCredentials: async ({}, use) => {
|
|
if (!tenantAdminEmail || !tenantAdminPassword) {
|
|
await use(null);
|
|
return;
|
|
}
|
|
|
|
await use({
|
|
email: tenantAdminEmail,
|
|
password: tenantAdminPassword,
|
|
});
|
|
},
|
|
|
|
signInTenantAdmin: async ({ page, tenantAdminCredentials }, use) => {
|
|
if (!tenantAdminCredentials) {
|
|
await use(async () => {
|
|
throw new Error('Tenant admin credentials missing. Provide E2E_TENANT_EMAIL and E2E_TENANT_PASSWORD.');
|
|
});
|
|
return;
|
|
}
|
|
|
|
await use(async () => {
|
|
await performTenantSignIn(page, tenantAdminCredentials);
|
|
});
|
|
},
|
|
});
|
|
|
|
export const expectFixture = expect;
|
|
|
|
async function performTenantSignIn(page: Page, credentials: TenantCredentials) {
|
|
await page.goto('/event-admin/login');
|
|
await page.fill('input[name="email"]', credentials.email);
|
|
await page.fill('input[name="password"]', credentials.password);
|
|
await page.click('button[type="submit"]');
|
|
await page.waitForURL(/\/event-admin(\/welcome)?/);
|
|
}
|