Complete 0.7.1 fixes
This commit is contained in:
1 parent
a08b02c34b
commit
64f55a8b1f
26 files changed
+610
-168
No files matched your search
+91
-2
@@ -364,6 +364,23 @@ function setSectionDuration(sectionId: string, seconds: number | null) {
|
||||
database.close();
|
||||
}
|
||||
|
||||
function setUsagePreparation(
|
||||
usageId: string,
|
||||
status: 'preparing' | 'ready',
|
||||
effort: 'low' | 'medium' | 'high' | null
|
||||
) {
|
||||
const dataDirectory = process.env.SENDEWERK_E2E_DATA_DIR;
|
||||
if (!dataDirectory) throw new Error('E2E-Datenverzeichnis ist nicht konfiguriert.');
|
||||
const database = new Database(path.join(dataDirectory, 'e2e.sqlite'));
|
||||
database
|
||||
.prepare(
|
||||
`UPDATE piece_usages SET preparation_status_snapshot = ?,
|
||||
preparation_effort_snapshot = ? WHERE id = ?`
|
||||
)
|
||||
.run(status, effort, usageId);
|
||||
database.close();
|
||||
}
|
||||
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
const page = await browser.newPage();
|
||||
await page.goto('/');
|
||||
@@ -665,7 +682,6 @@ test('show overview switches persistently between list, calendar and mobile agen
|
||||
const octoberDay = page
|
||||
.locator('.show-calendar-day')
|
||||
.filter({ hasText: 'Kalender Frühtermin' });
|
||||
await expect(octoberDay).toHaveClass(/today/);
|
||||
await expect(octoberDay).toContainText('Kalender Spättermin');
|
||||
await expect(octoberDay.locator('.show-calendar-event')).toHaveCount(2);
|
||||
await expect(octoberDay.locator('.show-calendar-event').first()).toContainText('10:00');
|
||||
@@ -703,6 +719,43 @@ test('show overview switches persistently between list, calendar and mobile agen
|
||||
}
|
||||
});
|
||||
|
||||
test('preparation opens and updates the concrete scheduled usage', async ({ page }) => {
|
||||
setUsagePreparation('usage-console', 'preparing', 'high');
|
||||
try {
|
||||
await page.goto('/sendungen');
|
||||
const preparation = page.locator('.preparation-overview');
|
||||
await expect(preparation).toContainText('Die kleine Konsole mit dem großen Dreh');
|
||||
await expect(preparation).toContainText('Hoch');
|
||||
await preparation.getByRole('link', { name: /Die kleine Konsole/ }).click();
|
||||
await expect(page).toHaveURL(/usage=usage-console/);
|
||||
|
||||
const editor = page.getByRole('dialog', {
|
||||
name: 'Die kleine Konsole mit dem großen Dreh'
|
||||
});
|
||||
await expect(editor).toBeVisible();
|
||||
await editor.getByRole('button', { name: 'Präsentation', exact: true }).click();
|
||||
await expect(editor.getByRole('radio', { name: 'Text', exact: true })).toBeChecked();
|
||||
await editor.getByRole('radio', { name: 'Nur Bild', exact: true }).check();
|
||||
await expect(editor.getByRole('combobox', { name: 'Quelle/URL', exact: true })).toHaveCount(0);
|
||||
await editor.getByRole('radio', { name: 'Linkvorschau', exact: true }).check();
|
||||
await expect(editor.getByRole('combobox', { name: 'Quelle/URL', exact: true })).toBeVisible();
|
||||
await expect(editor.getByLabel('Kartentitel')).toBeVisible();
|
||||
await editor.getByRole('radio', { name: 'Video', exact: true }).check();
|
||||
await expect(editor.getByRole('combobox', { name: 'Video-URL', exact: true })).toBeVisible();
|
||||
await expect(editor.getByLabel('Videotitel')).toBeVisible();
|
||||
await editor.getByRole('radio', { name: 'Text', exact: true }).check();
|
||||
await editor.getByRole('button', { name: 'Sendungstext', exact: true }).click();
|
||||
await editor.getByText('Dauer und Einplanung', { exact: true }).click();
|
||||
await editor.getByLabel('Vorbereitungsstatus').selectOption('ready');
|
||||
await editor.getByRole('button', { name: 'Verwendung speichern' }).click();
|
||||
|
||||
await page.goto('/sendungen');
|
||||
await expect(page.locator('.preparation-overview')).toHaveCount(0);
|
||||
} finally {
|
||||
setUsagePreparation('usage-console', 'ready', null);
|
||||
}
|
||||
});
|
||||
|
||||
test('desktop builder keeps the fundus beside the wider run sheet', async ({ page }, testInfo) => {
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
await page.goto('/fundus');
|
||||
@@ -1277,6 +1330,14 @@ test('live control persists state and exposes only explicit presentation data',
|
||||
});
|
||||
await page.getByLabel('Alternativtext').fill('Kleine Konsole im Live-Bild');
|
||||
await page.getByRole('button', { name: 'Bild hochladen' }).click();
|
||||
await page.getByRole('button', { name: 'Präsentation', exact: true }).click();
|
||||
await page.getByRole('radio', { name: 'Nur Bild', exact: true }).check();
|
||||
await expect(page.locator('.save-indicator')).toContainText('Gespeichert', { timeout: 10_000 });
|
||||
await page.reload();
|
||||
await page.getByRole('button', { name: 'Präsentation', exact: true }).click();
|
||||
await expect(page.getByRole('radio', { name: 'Nur Bild', exact: true })).toBeChecked();
|
||||
await page.getByRole('radio', { name: 'Text', exact: true }).check();
|
||||
await expect(page.locator('.save-indicator')).toContainText('Gespeichert', { timeout: 10_000 });
|
||||
await page.goto('/sendungen/show-october');
|
||||
const plannedConsole = page
|
||||
.locator('.editable-usage')
|
||||
@@ -1741,10 +1802,31 @@ test('completion, archive and protected guest sharing work end to end', async ({
|
||||
await expect(page.getByText('Gesendeter Abschlussbeitrag')).toBeVisible();
|
||||
await expect(page.getByText('Übersprungener Abschlussbeitrag')).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'Sendungsdaten speichern' })).toHaveCount(0);
|
||||
expect(
|
||||
await page
|
||||
.locator('.historical-section')
|
||||
.first()
|
||||
.evaluate((element) => Number.parseFloat(getComputedStyle(element).paddingInlineStart))
|
||||
).toBeGreaterThan(0);
|
||||
|
||||
await page.goto('/verwaltung');
|
||||
const shareCatalog = page.locator('.share-catalog-panel');
|
||||
await expect(shareCatalog).toBeVisible();
|
||||
const catalogOrder = await page.evaluate(() => {
|
||||
const share = document.querySelector('.share-catalog-panel')?.getBoundingClientRect();
|
||||
const tools = document.querySelector('.tool-management')?.getBoundingClientRect();
|
||||
return share && tools ? share.bottom <= tools.top : false;
|
||||
});
|
||||
expect(catalogOrder).toBe(true);
|
||||
await page.getByRole('button', { name: 'Lesefreigaben' }).click();
|
||||
const shareManagement = page.locator('.share-management');
|
||||
await expect(page.locator('.share-management-dialog')).toBeVisible();
|
||||
const dialogStyle = await page.locator('.share-management-dialog').evaluate((element) => ({
|
||||
borderRadius: Number.parseFloat(getComputedStyle(element).borderRadius),
|
||||
background: getComputedStyle(element).backgroundColor
|
||||
}));
|
||||
expect(dialogStyle.borderRadius).toBeGreaterThan(0);
|
||||
expect(dialogStyle.background).not.toBe('rgba(0, 0, 0, 0)');
|
||||
await shareManagement.getByLabel('Sendung').selectOption('e2e-completion');
|
||||
await shareManagement.getByLabel('Informationsumfang').selectOption('moderation');
|
||||
await shareManagement.getByLabel('Optionales Passwort').fill('E2E-Freigabe-Passwort');
|
||||
@@ -1772,6 +1854,12 @@ test('completion, archive and protected guest sharing work end to end', async ({
|
||||
await expect(guestPage.getByText('PRIVATE_FREIGABE_RECHERCHE')).toHaveCount(0);
|
||||
await expect(guestPage.getByText('PRIVATE_FREIGABE_NOTIZ')).toHaveCount(0);
|
||||
await expect(guestPage.getByAltText('Freigegebenes Abschlussbild')).toBeVisible();
|
||||
expect(
|
||||
await guestPage
|
||||
.locator('.shared-section')
|
||||
.first()
|
||||
.evaluate((element) => Number.parseFloat(getComputedStyle(element).paddingInlineStart))
|
||||
).toBeGreaterThan(0);
|
||||
await guestPage.setViewportSize({ width: 390, height: 844 });
|
||||
await expectNoHorizontalOverflow(guestPage);
|
||||
await guestPage.screenshot({ path: testInfo.outputPath('share-mobile.png'), fullPage: true });
|
||||
@@ -2036,6 +2124,7 @@ test('link preview uses one existing source, persists manual fields and isolates
|
||||
await page.getByRole('combobox', { name: 'Quelle/URL', exact: true }).selectOption('0');
|
||||
await page.getByLabel('Kartentitel').fill('Manuell korrigierte Linkvorschau');
|
||||
await page.getByLabel('Anreißer').fill('Ein kurzer manueller Anreißer ohne Vorschaubild.');
|
||||
await page.getByLabel('Vorschaubild-URL').fill('');
|
||||
await expect(page.locator('.save-indicator')).toContainText('Gespeichert', { timeout: 10_000 });
|
||||
await page.reload();
|
||||
await page.getByRole('button', { name: 'Präsentation', exact: true }).click();
|
||||
@@ -2051,7 +2140,7 @@ test('link preview uses one existing source, persists manual fields and isolates
|
||||
preview.getByRole('heading', { name: 'Manuell korrigierte Linkvorschau' })
|
||||
).toBeVisible();
|
||||
await expect(preview.getByText('Ein kurzer manueller Anreißer ohne Vorschaubild.')).toBeVisible();
|
||||
await expect(preview.locator('.output-link-image')).toHaveCount(1);
|
||||
await expect(preview.locator('.output-link-image')).toHaveCount(0);
|
||||
await preview.screenshot({
|
||||
path: testInfo.outputPath('linkvorschau-desktop.png'),
|
||||
fullPage: true
|
||||
|
||||
Reference in new issue
Block a user