Files
fotospiel-app/tests/e2e/event-admin-dashboard.test.ts

40 lines
1.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { test, expectFixture as expect } from './utils/test-fixtures';
test.describe('Tenant Admin core flows', () => {
test('dashboard shows key sections for seeded tenant', async ({ signInTenantAdmin, page }) => {
await signInTenantAdmin();
await expect(page).toHaveURL(/\/event-admin(\/welcome)?/);
if (page.url().includes('/event-admin/welcome')) {
await page.getByRole('button', { name: /Direkt zum Dashboard/i }).click();
}
await expect(page.getByRole('heading', { name: /Hallo/i })).toBeVisible();
await expect(page.getByRole('button', { name: /Neues Event/i })).toBeVisible();
await expect(page.getByRole('button', { name: /Guided Setup/i })).toBeVisible();
await expect(page.getByRole('heading', { name: /Hallo Lumen Moments!/i })).toBeVisible();
await expect(page.getByRole('button', { name: /Neues Event/i })).toBeVisible();
await expect(page.getByRole('button', { name: /Guided Setup/i })).toBeVisible();
});
test('events overview lists published and draft events', async ({ signInTenantAdmin, page }) => {
await signInTenantAdmin();
await page.goto('/event-admin/events');
await page.waitForLoadState('networkidle');
await expect(page.getByRole('heading', { name: /Deine Events/i })).toBeVisible({ timeout: 15_000 });
await expect(page.getByRole('button', { name: /Neues Event/i })).toBeVisible();
});
test('billing page lists the active package and history', async ({ signInTenantAdmin, page }) => {
await signInTenantAdmin();
await page.goto('/event-admin/billing');
await expect(page.getByRole('heading', { name: /Pakete & Abrechnung/i })).toBeVisible({ timeout: 15_000 });
await expect(page.getByRole('heading', { name: /Paketübersicht/i })).toBeVisible();
await expect(page.getByText(/Paket-Historie/)).toBeVisible();
});
});