Update Playwright staging flows and Paddle sandbox checkout
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user