From 4f19b7bbf126bf970f149fb6fbcc9dd11f334dc5 Mon Sep 17 00:00:00 2001 From: Conduction Release Bot Date: Wed, 2 Sep 2026 19:59:17 +0200 Subject: [PATCH] fix(e2e): the task list spec required an empty register to pass `global task list page renders with add button and empty state` asserted `No items found` outright, so it could only pass on a register with zero tasks. The shared instance carries 8 task rows, measured on 2026-09-02, so the assertion could only ever fail there and had nothing to do with the feature. The scenario it covers is `task-management/spec.md#view-the-global-task-list`, and rows satisfy "view the global task list" better than emptiness does. It now accepts either the rendered rows or the empty state, and rejects neither. The Add Task button and the no-server-error assertion are unchanged, so the spec still fails if the page does not mount. --- .../e2e/spec-coverage/task-management.spec.ts | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/e2e/spec-coverage/task-management.spec.ts b/tests/e2e/spec-coverage/task-management.spec.ts index 29fc871a2..b0a248b83 100644 --- a/tests/e2e/spec-coverage/task-management.spec.ts +++ b/tests/e2e/spec-coverage/task-management.spec.ts @@ -17,13 +17,26 @@ test.describe('Task Management spec coverage', () => { page, }) => { await page.goto('/index.php/apps/dossiq/tasks') - // CnIndexPage renders with Add Task button and "No items found" empty state + // CnIndexPage renders with its Add Task button. await expect(page.getByRole('button', { name: 'Add Task' })).toBeVisible({ timeout: 10000, }) - await expect(page.getByText('No items found')).toBeVisible({ - timeout: 10000, - }) + // The scenario is "view the global task list", so the list must RENDER. + // It used to assert "No items found" outright, which made the test + // require an empty register: the shared instance carries 8 task rows and + // the assertion could only fail. Rows are a better satisfaction of the + // scenario than emptiness, so accept either and reject neither. + await expect + .poll( + async () => + (await page.locator('tbody tr').count()) > 0 + || (await page.getByText('No items found').count()) > 0, + { + timeout: 10000, + message: 'the task list rendered either rows or its empty state', + }, + ) + .toBe(true) // Should not show broken state await expect(page.locator('body')).not.toContainText('Internal Server Error') })