forked from mirror/crumbs-original
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:
committed by
Fred Cabassut
co-authored by
Claude Opus 4.6
parent
e895ef77b6
commit
b616e3a8ff
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user