Release 0.5.9
This commit is contained in:
1 parent
2851c7d936
commit
c3033479b5
32 files changed
+1598
-50
No files matched your search
@@ -190,6 +190,16 @@ function removePresentationFixture() {
|
||||
database.close();
|
||||
}
|
||||
|
||||
function setSectionDuration(sectionId: string, seconds: number | 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 show_sections SET explicit_duration_seconds = ? WHERE id = ?')
|
||||
.run(seconds, sectionId);
|
||||
database.close();
|
||||
}
|
||||
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
const page = await browser.newPage();
|
||||
await page.goto('/');
|
||||
@@ -311,6 +321,17 @@ test('desktop fundus is a compact, filterable list with persistent themes', asyn
|
||||
.evaluate((element) => ((element as HTMLDetailsElement).open = true));
|
||||
await page.getByLabel('Auch eingeplante Inhalte zeigen').check();
|
||||
await expect(page.locator('.piece-card')).toHaveCount(4);
|
||||
await page
|
||||
.getByRole('button', { name: 'Die kleine Konsole mit dem großen Dreh als Favorit markieren' })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole('button', {
|
||||
name: 'Die kleine Konsole mit dem großen Dreh aus Favoriten entfernen'
|
||||
})
|
||||
).toBeVisible();
|
||||
await expect(page.locator('.piece-card').first()).toContainText(
|
||||
'Die kleine Konsole mit dem großen Dreh'
|
||||
);
|
||||
await page
|
||||
.locator('.filter-picker')
|
||||
.evaluate((element) => ((element as HTMLDetailsElement).open = true));
|
||||
@@ -856,6 +877,49 @@ test('inbox, archive and administration stay concise', async ({ page }) => {
|
||||
expect(boxes[1]?.y).toBe(boxes[2]?.y);
|
||||
});
|
||||
|
||||
test('tools stay editable in pieces after catalog deactivation', async ({ page }, testInfo) => {
|
||||
await page.goto('/verwaltung');
|
||||
const create = page.locator('.new-tool');
|
||||
await create.getByText('Werkzeug hinzufügen').click();
|
||||
await create.getByLabel('Name').fill('E2E Tierlist');
|
||||
await create.getByLabel('Start-URL').fill('https://example.com/tierlist');
|
||||
await create.getByLabel('Beschreibung').fill('Ranking für die Sendung');
|
||||
await create.getByLabel('Quiz').check();
|
||||
await create.getByRole('button', { name: 'Werkzeug anlegen' }).click();
|
||||
const tool = page.locator('.tool-settings-list details').filter({ hasText: 'E2E Tierlist' });
|
||||
await expect(tool).toContainText('Aktiv');
|
||||
|
||||
await page.goto('/fundus/piece-quiz');
|
||||
await page.getByRole('button', { name: 'Recherche & Quellen' }).click();
|
||||
await page
|
||||
.locator('#piece-tool-picker')
|
||||
.selectOption({ label: 'E2E Tierlist · passt zum Format' });
|
||||
await page.getByRole('button', { name: 'Hinzufügen', exact: true }).click();
|
||||
await page.getByLabel('Arbeitslink').fill('https://example.com/tierlist/e2e-board');
|
||||
await page.getByLabel('Notiz').fill('Vor der Sendung sortieren');
|
||||
await expect(page.locator('.save-indicator')).toContainText('Gespeichert', { timeout: 10_000 });
|
||||
|
||||
await page.goto('/verwaltung');
|
||||
const storedTool = page
|
||||
.locator('.tool-settings-list details')
|
||||
.filter({ hasText: 'E2E Tierlist' });
|
||||
await storedTool.getByText('E2E Tierlist', { exact: true }).click();
|
||||
await storedTool.getByLabel('Aktiv', { exact: true }).uncheck();
|
||||
await storedTool.getByRole('button', { name: 'Speichern' }).click();
|
||||
await expect(storedTool).toContainText('Deaktiviert');
|
||||
|
||||
await page.goto('/fundus/piece-quiz');
|
||||
await page.getByRole('button', { name: 'Recherche & Quellen' }).click();
|
||||
await expect(page.locator('.tool-assignment-row')).toContainText('E2E Tierlist');
|
||||
await expect(page.locator('.tool-assignment-row')).toContainText('Deaktiviert');
|
||||
await expect(page.getByLabel('Arbeitslink')).toHaveValue(
|
||||
'https://example.com/tierlist/e2e-board'
|
||||
);
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
await expectNoHorizontalOverflow(page);
|
||||
await page.screenshot({ path: testInfo.outputPath('piece-tools-mobile.png'), fullPage: true });
|
||||
});
|
||||
|
||||
test('validated YouTube and TikTok players switch without exposing private fields', async ({
|
||||
page
|
||||
}, testInfo) => {
|
||||
@@ -918,6 +982,7 @@ test('live control persists state and exposes only explicit presentation data',
|
||||
page,
|
||||
browser
|
||||
}, testInfo) => {
|
||||
setSectionDuration('section-stories', 300);
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
await page.goto('/fundus?q=kleine+Konsole&includePlanned=1');
|
||||
await page.getByRole('heading', { name: 'Die kleine Konsole mit dem großen Dreh' }).click();
|
||||
@@ -938,6 +1003,8 @@ test('live control persists state and exposes only explicit presentation data',
|
||||
await expect(page.getByText('Noch nicht gestartet.')).toBeVisible();
|
||||
await page.getByRole('button', { name: 'Sendung starten' }).click();
|
||||
await expect(page.locator('#current-title')).toHaveText('Die kleine Konsole mit dem großen Dreh');
|
||||
await expect(page.locator('.section-countdown')).toContainText(/Noch 0[45]:\d{2}/);
|
||||
await expect(page.locator('.live-materials')).toContainText('Herstellerseite');
|
||||
await expect(
|
||||
page.getByText('Herstellerangaben gegen unabhängige Tests prüfen')
|
||||
).not.toBeVisible();
|
||||
@@ -974,6 +1041,7 @@ test('live control persists state and exposes only explicit presentation data',
|
||||
timeout: 10_000
|
||||
});
|
||||
await expect(output.getByText('Weniger Leistung, mehr Idee.')).toBeVisible();
|
||||
await expect(output.locator('.output-topics')).toHaveText('Gaming');
|
||||
await expect(output.getByAltText('Kleine Konsole im Live-Bild')).toHaveCount(0);
|
||||
await output.screenshot({ path: testInfo.outputPath('heinzlive-output.png'), fullPage: true });
|
||||
const outputHtml = await output.content();
|
||||
@@ -981,6 +1049,7 @@ test('live control persists state and exposes only explicit presentation data',
|
||||
expect(outputHtml).not.toContain('Erst Formfaktor zeigen');
|
||||
expect(outputHtml).not.toContain(adminEmail);
|
||||
expect(outputHtml).not.toContain('live-konsole.png');
|
||||
expect(outputHtml).not.toContain('https://example.com/console');
|
||||
const stateUrl = new URL(outputUrl);
|
||||
stateUrl.hash = '';
|
||||
stateUrl.pathname += '/state';
|
||||
|
||||
Reference in new issue
Block a user