-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[do not merge][lexical-yjs][lexical-playground] Chore: Add test for collaboration undo bug #6670
base: main
Are you sure you want to change the base?
[do not merge][lexical-yjs][lexical-playground] Chore: Add test for collaboration undo bug #6670
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
@@ -230,4 +230,92 @@ test.describe('Collaboration', () => { | |||
focusPath: [1, 1, 0], | |||
}); | |||
}); | |||
|
|||
test('Undo with two collaborators editing same paragraph', async ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is failing on the ci :(
the failure is reproducible across different envs so i dont think its a flaky failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the point of this PR, to demonstrate that bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I created this test in case it helps others with reproducing the bug and confirming a fix, but it's not something that can be merged on its own. Let me know if I should switch this to a draft PR for now, if that's clearer for PR queue management.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see, thanks for filing a detailed issue. if its not meant to be merged, converting to draft or adding a [do not merge] to title would work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Title updated 👍
Description
Adds a test for the issue #6614 where using undo in a collaborative session results in the Lexical editor content getting out of sync with the Yjs doc, which then leads to loss of document content.
Test plan
Before
No tests to detect the bugs that lead to unexpected loss of editor content after using undo.
After
Playwright test added which uses the side-by-side collaborative playground editors to reproduce the bug after using undo.
Note that this test actually detects two separate bugs: