Skip to content

Commit d869643

Browse files
committed
Wait for collaborator to leave before they rejoin.
1 parent 59d5f5a commit d869643

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

tests/e2e/specs/collaboration/collaboration-sync.test.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ test.describe( 'Collaboration - Sync', () => {
171171
} );
172172

173173
// Skipped: User C returning to editor triggers too many collaborators, causing failures.
174-
test.skip( 'User C joins late and sees existing content from A and B', async ( {
174+
test( 'User C joins late and sees existing content from A and B', async ( {
175175
collaborationUtils,
176176
editor,
177177
} ) => {
@@ -185,6 +185,16 @@ test.describe( 'Collaboration - Sync', () => {
185185
// present while A and B make edits.
186186
await page3.goto( '/wp-admin/' );
187187

188+
// Wait for User C's awareness entry to expire on the server (30s timeout)
189+
// by watching the button label drop from 3 to 2 collaborators.
190+
const presenceButton = page2.getByRole( 'button', {
191+
name: /Collaborators list/,
192+
} );
193+
await expect( presenceButton ).toHaveAccessibleName(
194+
/2 online/,
195+
{ timeout: 45000 }
196+
);
197+
188198
// User A and B each add a block while User C is away.
189199
await editor.insertBlock( {
190200
name: 'core/paragraph',

0 commit comments

Comments
 (0)