fix: update checklist e2e tests for done-expanded default

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 <noreply@anthropic.com>
This commit is contained in:
Frederic Cabassut
2026-03-08 18:15:25 +01:00
committed by Fred Cabassut
co-authored by Claude Opus 4.6
parent 4a596cefec
commit f70529d1d0
+2 -6
View File
@@ -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');
});