Compare commits
2 Commits
a7eaa40852
...
feature/68
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53b482c5f2 | ||
|
|
fa9577052d |
@@ -180,19 +180,19 @@ test.describe('Admin — tag management', () => {
|
|||||||
// Wait for the tags list to render after the tab switch
|
// Wait for the tags list to render after the tab switch
|
||||||
await page.waitForSelector('ul > li');
|
await page.waitForSelector('ul > li');
|
||||||
|
|
||||||
// Hover over the "Familie" row to reveal the opacity-0 action buttons
|
// Hover over the "Fest" row to reveal the opacity-0 action buttons
|
||||||
const familieRow = page
|
const festRow = page
|
||||||
.locator('ul > li')
|
.locator('ul > li')
|
||||||
.filter({ has: page.locator('span', { hasText: /^Familie$/ }) });
|
.filter({ has: page.locator('span', { hasText: /^Fest$/ }) });
|
||||||
await familieRow.hover();
|
await festRow.hover();
|
||||||
await familieRow.getByRole('button', { name: 'Schlagwort bearbeiten' }).click();
|
await festRow.getByRole('button', { name: 'Schlagwort bearbeiten' }).click();
|
||||||
|
|
||||||
// After clicking edit, {#if editingTagId} replaces the span with a form —
|
// After clicking edit, {#if editingTagId} replaces the span with a form —
|
||||||
// the familieRow filter no longer matches, so we find the input directly.
|
// the festRow filter no longer matches, so we find the input directly.
|
||||||
await page.locator('input[name="name"]').fill('Familie (E2E)');
|
await page.locator('input[name="name"]').fill('Fest (E2E)');
|
||||||
await page.getByRole('button', { name: 'Speichern' }).click();
|
await page.getByRole('button', { name: 'Speichern' }).click();
|
||||||
|
|
||||||
await expect(page.getByText('Familie (E2E)')).toBeVisible();
|
await expect(page.getByText('Fest (E2E)')).toBeVisible();
|
||||||
await page.screenshot({ path: 'test-results/e2e/admin-tag-renamed.png' });
|
await page.screenshot({ path: 'test-results/e2e/admin-tag-renamed.png' });
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -205,14 +205,14 @@ test.describe('Admin — tag management', () => {
|
|||||||
|
|
||||||
const renamedRow = page
|
const renamedRow = page
|
||||||
.locator('ul > li')
|
.locator('ul > li')
|
||||||
.filter({ has: page.locator('span', { hasText: /^Familie \(E2E\)$/ }) });
|
.filter({ has: page.locator('span', { hasText: /^Fest \(E2E\)$/ }) });
|
||||||
await renamedRow.hover();
|
await renamedRow.hover();
|
||||||
await renamedRow.getByRole('button', { name: 'Schlagwort bearbeiten' }).click();
|
await renamedRow.getByRole('button', { name: 'Schlagwort bearbeiten' }).click();
|
||||||
|
|
||||||
await page.locator('input[name="name"]').fill('Familie');
|
await page.locator('input[name="name"]').fill('Fest');
|
||||||
await page.getByRole('button', { name: 'Speichern' }).click();
|
await page.getByRole('button', { name: 'Speichern' }).click();
|
||||||
|
|
||||||
await expect(page.getByText('Familie')).toBeVisible();
|
await expect(page.getByText('Fest')).toBeVisible();
|
||||||
await page.screenshot({ path: 'test-results/e2e/admin-tag-restored.png' });
|
await page.screenshot({ path: 'test-results/e2e/admin-tag-restored.png' });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ test.describe('Document editing', () => {
|
|||||||
await page.getByRole('button', { name: 'Speichern', exact: true }).click();
|
await page.getByRole('button', { name: 'Speichern', exact: true }).click();
|
||||||
|
|
||||||
await expect(page).toHaveURL(/\/documents\/[^/]+$/);
|
await expect(page).toHaveURL(/\/documents\/[^/]+$/);
|
||||||
await expect(page.getByText('E2E Testbrief (überarbeitet)')).toBeVisible();
|
await expect(page.getByRole('heading', { name: 'E2E Testbrief (überarbeitet)' })).toBeVisible();
|
||||||
await page.screenshot({ path: 'test-results/e2e/document-edit-save.png' });
|
await page.screenshot({ path: 'test-results/e2e/document-edit-save.png' });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -461,9 +461,11 @@ test.describe('PDF annotations — file hash versioning', () => {
|
|||||||
await page.waitForSelector('[data-hydrated]');
|
await page.waitForSelector('[data-hydrated]');
|
||||||
await page.locator('canvas').first().waitFor({ state: 'visible', timeout: 20000 });
|
await page.locator('canvas').first().waitFor({ state: 'visible', timeout: 20000 });
|
||||||
|
|
||||||
// Use :not() to exclude the outdated-notice element whose testid also starts with "annotation-"
|
// Use :not() to exclude the outdated-notice and side-panel elements whose testid also starts with "annotation-"
|
||||||
await expect(
|
await expect(
|
||||||
page.locator('[data-testid^="annotation-"]:not([data-testid="annotation-outdated-notice"])')
|
page.locator(
|
||||||
|
'[data-testid^="annotation-"]:not([data-testid="annotation-outdated-notice"]):not([data-testid="annotation-side-panel"])'
|
||||||
|
)
|
||||||
).toHaveCount(0, { timeout: 8000 });
|
).toHaveCount(0, { timeout: 8000 });
|
||||||
await expect(page.locator('[data-testid="annotation-outdated-notice"]')).toBeVisible({
|
await expect(page.locator('[data-testid="annotation-outdated-notice"]')).toBeVisible({
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
|
|||||||
@@ -68,5 +68,6 @@ let selectedReceivers = $state(doc.receivers ?? []);
|
|||||||
<SaveBar docId={doc.id} />
|
<SaveBar docId={doc.id} />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<form id="mark-for-review-form" method="POST" action="?/markForReview" use:enhance></form>
|
||||||
<form id="delete-form" method="POST" action="?/delete" use:enhance></form>
|
<form id="delete-form" method="POST" action="?/delete" use:enhance></form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { m } from '$lib/paraglide/messages.js';
|
import { m } from '$lib/paraglide/messages.js';
|
||||||
import { enhance } from '$app/forms';
|
|
||||||
|
|
||||||
let { docId }: { docId: string } = $props();
|
let { docId }: { docId: string } = $props();
|
||||||
|
|
||||||
@@ -78,5 +77,3 @@ let confirmDelete = $state(false);
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="mark-for-review-form" method="POST" action="?/markForReview" use:enhance></form>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user