feat(admin): dedicated routes for user management (#37) #47
@@ -187,9 +187,10 @@ test.describe('Admin — tag management', () => {
|
||||
await familieRow.hover();
|
||||
await familieRow.getByRole('button', { name: 'Schlagwort bearbeiten' }).click();
|
||||
|
||||
const nameInput = familieRow.locator('input[name="name"]');
|
||||
await nameInput.fill('Familie (E2E)');
|
||||
await familieRow.getByRole('button', { name: /Speichern/i }).click();
|
||||
// After clicking edit, {#if editingTagId} replaces the span with a form —
|
||||
// the familieRow filter no longer matches, so we find the input directly.
|
||||
await page.locator('input[name="name"]').fill('Familie (E2E)');
|
||||
await page.getByRole('button', { name: 'Speichern' }).click();
|
||||
|
||||
await expect(page.getByText('Familie (E2E)')).toBeVisible();
|
||||
await page.screenshot({ path: 'test-results/e2e/admin-tag-renamed.png' });
|
||||
@@ -208,9 +209,8 @@ test.describe('Admin — tag management', () => {
|
||||
await renamedRow.hover();
|
||||
await renamedRow.getByRole('button', { name: 'Schlagwort bearbeiten' }).click();
|
||||
|
||||
const nameInput = renamedRow.locator('input[name="name"]');
|
||||
await nameInput.fill('Familie');
|
||||
await renamedRow.getByRole('button', { name: /Speichern/i }).click();
|
||||
await page.locator('input[name="name"]').fill('Familie');
|
||||
await page.getByRole('button', { name: 'Speichern' }).click();
|
||||
|
||||
await expect(page.getByText('Familie')).toBeVisible();
|
||||
await page.screenshot({ path: 'test-results/e2e/admin-tag-restored.png' });
|
||||
|
||||
@@ -61,8 +61,11 @@ test.describe('Authentication', () => {
|
||||
|
||||
test('logout clears the session and redirects to /login', async ({ page }) => {
|
||||
await login(page);
|
||||
// Logout is inside the user avatar dropdown — open it first
|
||||
// Logout is inside the user avatar dropdown — open it first.
|
||||
// Wait for the dropdown button to be visible before clicking Abmelden,
|
||||
// since the {#if userMenuOpen} block renders asynchronously in Svelte.
|
||||
await page.locator('button[aria-haspopup="true"]').click();
|
||||
await expect(page.getByRole('button', { name: 'Abmelden' })).toBeVisible();
|
||||
await page.getByRole('button', { name: 'Abmelden' }).click();
|
||||
await expect(page).toHaveURL(/\/login/);
|
||||
// Confirm session is gone: navigating to / redirects back
|
||||
|
||||
Reference in New Issue
Block a user