Skip to content

Commit

Permalink
Fix await in focusEditor, likely the cause of the flaky isCollab tests
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed Nov 13, 2023
1 parent 7efdba1 commit c10340d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/lexical-playground/__tests__/utils/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,10 @@ export async function focusEditor(page, parentSelector = '.editor-shell') {
if (IS_COLLAB) {
await page.waitForSelector('iframe[name="left"]');
const leftFrame = page.frame('left');
if ((await leftFrame.$$('.loading').length) !== 0) {
if ((await leftFrame.$$('.loading')).length !== 0) {
await leftFrame.waitForSelector('.loading', {
state: 'detached',
});
await sleep(500);
}
await leftFrame.focus(selector);
} else {
Expand Down

0 comments on commit c10340d

Please sign in to comment.