From 5c67db3d3400c3c9882cb3513cb0c94e10fd80d8 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 3 Jul 2026 08:02:51 +0000 Subject: [PATCH] Add playwright test for report snippets --- src/frontend/tests/pui_settings.spec.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/frontend/tests/pui_settings.spec.ts b/src/frontend/tests/pui_settings.spec.ts index 71042ba5fa..b4947677ab 100644 --- a/src/frontend/tests/pui_settings.spec.ts +++ b/src/frontend/tests/pui_settings.spec.ts @@ -254,6 +254,22 @@ test('Settings - Admin', async ({ browser }) => { await loadTab(page, 'Category Parameters'); await loadTab(page, 'Label Templates'); await loadTab(page, 'Report Templates'); + + // Check the "report snippets" panel + await loadTab(page, 'Report Snippets'); + await page + .getByText( + 'Snippets are reusable pieces of HTML content that can be inserted into reports and labels.' + ) + .waitFor(); + + // Launch the dialog to upload a new snippet + await page.getByLabel('action-button-add-snippet').click(); + await page.getByText('Add Snippet', { exact: true }).waitFor(); + await page.locator('input[type="file"]').waitFor({ state: 'attached' }); + await page.getByLabel('text-field-description').waitFor(); + await page.getByRole('button', { name: 'Cancel' }).click(); + await loadTab(page, 'Plugins'); // Adjust some "location type" items