|
|
|
@@ -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' });
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|