Update Playwright staging flows and Paddle sandbox checkout
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-03 17:04:32 +01:00
parent 4f1fbcc98b
commit a35808ac15
10 changed files with 341 additions and 203 deletions

View File

@@ -10,9 +10,9 @@ import { test, expectFixture as expect } from '../helpers/test-fixtures';
*/
test.describe('Tenant Onboarding Welcome Flow', () => {
test('redirects unauthenticated users to login', async ({ page }) => {
await page.goto('/event-admin/welcome');
await page.goto('/event-admin/mobile/welcome');
await expect(page).toHaveURL(/\/event-admin\/login/);
await expect(page.getByText('Bitte warten', { exact: false })).toBeVisible();
await expect(page.getByText(/Team Login|Fotospiel Event Admin|Login/i)).toBeVisible();
});
test('tenant admin can progress through welcome, packages, summary, and setup', async ({
@@ -28,15 +28,15 @@ test.describe('Tenant Onboarding Welcome Flow', () => {
await signInTenantAdmin();
// If guard redirects to dashboard, hop to welcome manually.
if (!page.url().includes('/event-admin/welcome')) {
await page.goto('/event-admin/welcome');
if (!page.url().includes('/event-admin/mobile/welcome')) {
await page.goto('/event-admin/mobile/welcome');
}
await expect(page.getByRole('heading', { name: /Willkommen im Event-Erlebnisstudio/i })).toBeVisible();
// Open package selection via CTA.
await page.getByRole('button', { name: /Pakete entdecken/i }).click();
await expect(page).toHaveURL(/\/event-admin\/welcome\/packages/);
await expect(page).toHaveURL(/\/event-admin\/mobile\/welcome\/packages/);
await expect(page.getByRole('heading', { name: /Wähle dein Eventpaket/i })).toBeVisible();
// Choose the first available package and ensure we land on the summary step.
@@ -44,7 +44,7 @@ test.describe('Tenant Onboarding Welcome Flow', () => {
await choosePackageButton.waitFor({ state: 'visible', timeout: 10_000 });
await choosePackageButton.click();
await expect(page).toHaveURL(/\/event-admin\/welcome\/summary/);
await expect(page).toHaveURL(/\/event-admin\/mobile\/welcome\/summary/);
await expect(page.getByRole('heading', { name: /Bestellübersicht/i })).toBeVisible();
// Validate Paddle payment section.
@@ -52,7 +52,7 @@ test.describe('Tenant Onboarding Welcome Flow', () => {
// Continue to the setup step without completing a purchase.
await page.getByRole('button', { name: /Weiter zum Setup/i }).click();
await expect(page).toHaveURL(/\/event-admin\/welcome\/event/);
await expect(page).toHaveURL(/\/event-admin\/mobile\/welcome\/event/);
await expect(page.getByRole('heading', { name: /Bereite dein erstes Event vor/i })).toBeVisible();
});
});