From b616e3a8ffe6bd8f9d9d55ec8a2f77ba09841adf Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Sun, 8 Mar 2026 18:10:27 +0100 Subject: [PATCH] fix: update checklist e2e tests for done-expanded default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tests were clicking the done toggle expecting to expand it, but since fed0fc1 changed doneExpanded to true by default, the click was collapsing it instead — causing visibility assertions to fail. Co-Authored-By: Claude Opus 4.6 --- tests/e2e/checklist.spec.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/e2e/checklist.spec.ts b/tests/e2e/checklist.spec.ts index faf4ca5..86b2cde 100644 --- a/tests/e2e/checklist.spec.ts +++ b/tests/e2e/checklist.spec.ts @@ -50,9 +50,8 @@ test.describe('Checklist', () => { await expect(page.getByTestId('checklist-toggle-done')).toContainText('1 done'); await page.getByTestId('close-editor-btn').click(); - // And reopening the note shows the item in the done section + // And reopening the note shows the item in the done section (expanded by default) await noteCard(page, 'Tasks').click(); - await page.getByTestId('checklist-toggle-done').click(); await expect(page.getByTestId('checklist-done-checkbox').first()).toBeChecked(); }); @@ -102,10 +101,7 @@ test.describe('Checklist', () => { await expect(page.getByTestId('checklist-toggle-done')).toBeVisible(); await expect(page.getByTestId('checklist-toggle-done')).toContainText('1 done'); - // When the user expands the done section - await page.getByTestId('checklist-toggle-done').click(); - - // Then the completed items are shown in the done section + // Then the completed items are shown in the done section (expanded by default) await expect(page.getByTestId('checklist-done-section')).toBeVisible(); await expect(page.getByTestId('checklist-done-section')).toContainText('Done task'); });