subdocument-splitting-plan

This commit is contained in:
rehlert committed 2026-10-06 22:52:35 +02:00
1 parent f09384d2e6
commit ca06ca2050
47 files changed
+4097 -136

No files matched your search

+13 -3
View File
@@ -159,13 +159,23 @@ export const trackPageErrors = (page: Page) => {
export const pdfDropzone = (page: Page) =>
page.getByRole('button', { name: 'PDF-Dateien hinzufügen' });
export const zipDropzone = (page: Page) =>
page.getByRole('button', { name: 'beA-ZIP-Dateien hinzufügen' });
page.getByRole('button', { name: 'beA-ZIP- oder PDF-Dateien hinzufügen' });
export const createZip = async (label: string, pageCount = 1) =>
Buffer.from(zipSync({ [`${label}.pdf`]: await createPdf(pageCount, label) }));
/** ZIP with multiple named single-page PDF attachments. */
export const createMultiFileZip = async (labels: string[]) =>
Buffer.from(
zipSync(
Object.fromEntries(
await Promise.all(labels.map(async (label) => [`${label}.pdf`, await createPdf(1, label)]))
)
)
);
export const newZipButton = (page: Page) =>
page.getByRole('button', { name: 'Neue ZIP bearbeiten' });
page.getByRole('button', { name: 'Neue Datei bearbeiten' });
export const settingsButton = (page: Page) =>
page.getByRole('button', { name: 'Einstellungen', exact: true });
export const replaceZipInput = (page: Page) => page.locator('input[data-zip-picker="replace-zip"]');
@@ -188,7 +198,7 @@ export const replaceThroughDialog = async (page: Page, zip: Buffer, confirm: boo
]);
await expect(page.getByText('Aktuelle Bearbeitung ersetzen?')).toBeVisible();
if (confirm) {
await page.getByRole('button', { name: 'Neue ZIP öffnen' }).click();
await page.getByRole('button', { name: 'Neue Datei öffnen' }).click();
} else {
await page.getByRole('button', { name: 'Abbrechen' }).click();
}