fix: resolve E2E editor test strict mode violations from leftover content (#140)#142
Merged
Merged
Conversation
…tent (#140) Co-authored-by: Ona <no-reply@ona.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
✅ UI verification skipped — no UI files changed. Only E2E test files ( |
This was referenced Apr 17, 2026
Collaborator
Author
|
❌ Post-merge verification failed (1/42 E2E tests). E2E suite: 41 passed, 1 failed
Ad-hoc smoke tests: all passed
The search empty state failure is a pre-existing bug unrelated to this PR's editor test changes. See #144. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #140
What
5 E2E editor tests failed against production due to Playwright strict mode violations and element-not-found errors. Tests typed content into the editor but used locators that either matched multiple elements (pre-existing bold text, headings from prior runs) or targeted the wrong element type (looking for
<p>when text landed inside<li>within a bullet list).How
Three fixes across the three affected test files:
moveToParagraphBlockhelper that presses Enter twice to exit any active list context before typing. Used uniqueDate.now()markers in all three drag tests so locators never match leftover content. Switched frompressSequentiallytopage.keyboard.type()for reliability.editor.locator("h1")toeditor.locator("h1").last()so the assertion targets the newly inserted heading instead of matching a pre-existing one. Added a count-before/count-after check to verify insertion.Date.now()markers and filter thestronglocator with.filter({ hasText: marker })to avoid matching pre-existing bold elements from prior runs.Testing
All 11 tests in the three affected files pass locally (previously 3 drag + 1 slash command + 2 toolbar = 5 failures). Full CI suite:
pnpm lint && pnpm typecheck && pnpm testall pass. E2E run: 11/11 passed.