forked from mirror/crumbs-original
fix: rename test note to avoid name collision in CI
- "Shopping" matched existing "Shopping List" note from another test - Renamed to "Groceries" to avoid strict mode violation - Reworded comments: "interleaved" → "checked items before active ones" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
32bd101421
commit
8a7d2ddb41
@@ -73,20 +73,21 @@ test.describe('Checklist', () => {
|
|||||||
await expect(page.getByTestId('checklist-input')).toHaveCount(2);
|
await expect(page.getByTestId('checklist-input')).toHaveCount(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Scenario: Enter key focuses new item on reopened note with interleaved checked items', async ({ authenticatedPage: page }) => {
|
test('Scenario: Enter key focuses new item on reopened note with checked items before active ones', async ({ authenticatedPage: page }) => {
|
||||||
// Given a saved checklist note with interleaved checked/unchecked items
|
// Given a saved checklist note where checked items precede active items
|
||||||
// (this is the state when reopening an existing note — checked items
|
// (this happens when reopening a note — parseChecklist preserves the
|
||||||
// are scattered in the content, not grouped at the end)
|
// saved order rather than grouping active items first)
|
||||||
await createChecklistNote(page, 'Shopping', ['Milk', 'Eggs', 'Bread', 'Butter']);
|
await createChecklistNote(page, 'Groceries', ['Milk', 'Eggs', 'Bread', 'Butter']);
|
||||||
|
|
||||||
// Reopen and check items 1 and 2 so content becomes interleaved
|
// Reopen and check items 1 and 2 so saved content has checked items first
|
||||||
await noteCard(page, 'Shopping').click();
|
await noteCard(page, 'Groceries').click();
|
||||||
await page.getByTestId('checklist-checkbox').nth(0).click(); // Milk → done
|
await page.getByTestId('checklist-checkbox').nth(0).click(); // Milk → done
|
||||||
await page.getByTestId('checklist-checkbox').nth(0).click(); // Eggs (now first active) → done
|
await page.getByTestId('checklist-checkbox').nth(0).click(); // Eggs (now first active) → done
|
||||||
await page.getByTestId('close-editor-btn').click();
|
await page.getByTestId('close-editor-btn').click();
|
||||||
|
|
||||||
// Reopen — parseChecklist restores interleaved order: [x]Milk, [x]Eggs, [ ]Bread, [ ]Butter
|
// Reopen — parseChecklist restores saved order: [x]Milk, [x]Eggs, [ ]Bread, [ ]Butter
|
||||||
await noteCard(page, 'Shopping').click();
|
// The checked items precede active ones in items[], but only active ones render as inputs
|
||||||
|
await noteCard(page, 'Groceries').click();
|
||||||
await expect(page.getByTestId('checklist-input')).toHaveCount(2); // Bread, Butter active
|
await expect(page.getByTestId('checklist-input')).toHaveCount(2); // Bread, Butter active
|
||||||
|
|
||||||
// When the user presses Enter on the first active item (Bread)
|
// When the user presses Enter on the first active item (Bread)
|
||||||
|
|||||||
Reference in New Issue
Block a user