Skip to content

Commit

Permalink
classic missing await
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed May 5, 2024
1 parent 2480a18 commit fe80950
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/lexical-playground/__tests__/e2e/Share.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
click,
expect,
focusEditor,
getPageOrFrame,
html,
initialize,
test,
Expand All @@ -28,13 +29,13 @@ test.describe('Share', () => {
test.beforeEach(({isCollab, page}) => initialize({isCollab, page}));
test('is disabled in collab', async ({page, isCollab}) => {
test.skip(!isCollab);
await focusEditor(page);
expect(page.locator('.action-button.share')).toBeDisabled();
const leftFrame = getPageOrFrame(page);
await expect(leftFrame.locator('.action-button.share')).toBeDisabled();
});
test('can share the editor state', async ({page, isCollab, browserName}) => {
test.skip(isCollab);
await focusEditor(page);

await focusEditor(page);
const fooHTML = html`
<p
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function ActionsPlugin({
</button>
<button
className="action-button share"
disabled={isCollabActive}
disabled={isCollabActive || INITIAL_SETTINGS.isCollab}
onClick={() =>
shareDoc(
serializedDocumentFromEditorState(editor.getEditorState(), {
Expand Down

0 comments on commit fe80950

Please sign in to comment.