You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5 E2E editor tests fail against production due to Playwright strict mode violations. Tests find multiple matching elements because content from previous test runs persists on the page. Detected during post-merge verification of PR #135, but unrelated to that PR's changes (search empty state fix).
Failures
1. e2e/editor-drag.spec.ts:5 — "drag handle appears when hovering a block"
Typed text not found in editor — locator('p').filter({ hasText: 'DragTest ...' }) finds no elements.
2. e2e/editor-drag.spec.ts:76 — "drag handle is draggable and positioned near the hovered block"
Same pattern — locator('p').filter({ hasText: 'Block one' }) finds no elements.
3. e2e/editor-slash-commands.spec.ts:46 — "selecting a heading option inserts a heading block"
editor.locator('h1') resolves to 2 elements (an existing "Imported Heading" h1 and the newly inserted one), causing a strict mode violation.
Same as above — editor.locator('strong') matches 2 elements.
Root Cause
These tests create content on existing pages but don't clean up. When the page already has content from prior runs (bold text, headings), the locators match multiple elements. The drag tests may also be affected by editor content not rendering in time.
Acceptance Criteria
All 5 failing editor E2E tests pass reliably against production
Tests use specific locators (e.g., .first(), .filter({ hasText }), or nth()) to avoid strict mode violations
Tests either create fresh pages or scope locators to newly inserted content
Description
5 E2E editor tests fail against production due to Playwright strict mode violations. Tests find multiple matching elements because content from previous test runs persists on the page. Detected during post-merge verification of PR #135, but unrelated to that PR's changes (search empty state fix).
Failures
1.
e2e/editor-drag.spec.ts:5— "drag handle appears when hovering a block"Typed text not found in editor —
locator('p').filter({ hasText: 'DragTest ...' })finds no elements.2.
e2e/editor-drag.spec.ts:76— "drag handle is draggable and positioned near the hovered block"Same pattern —
locator('p').filter({ hasText: 'Block one' })finds no elements.3.
e2e/editor-slash-commands.spec.ts:46— "selecting a heading option inserts a heading block"editor.locator('h1')resolves to 2 elements (an existing "Imported Heading" h1 and the newly inserted one), causing a strict mode violation.4.
e2e/editor-toolbar.spec.ts:34— "bold button toggles bold formatting"editor.locator('strong')resolves to 2 elements (a pre-existing bold element and the newly bolded text), causing a strict mode violation.5.
e2e/editor-toolbar.spec.ts:94— "keyboard shortcut Cmd+B applies bold"Same as above —
editor.locator('strong')matches 2 elements.Root Cause
These tests create content on existing pages but don't clean up. When the page already has content from prior runs (bold text, headings), the locators match multiple elements. The drag tests may also be affected by editor content not rendering in time.
Acceptance Criteria
.first(),.filter({ hasText }), ornth()) to avoid strict mode violationspnpm lint && pnpm typecheck && pnpm testpassTechnical Notes
e2e/editor-drag.spec.ts,e2e/editor-slash-commands.spec.ts,e2e/editor-toolbar.spec.ts