diff --git a/packages/story-editor/src/components/canvas/karma/quickActions.karma.js b/packages/story-editor/src/components/canvas/karma/quickActions.karma.js index b314285d700c..cde7c6e85081 100644 --- a/packages/story-editor/src/components/canvas/karma/quickActions.karma.js +++ b/packages/story-editor/src/components/canvas/karma/quickActions.karma.js @@ -124,20 +124,19 @@ describe('Quick Actions integration', () => { }); it(`clicking the \`${ACTIONS.INSERT_TEXT.text}\` button should select the background, open the text tab in the library and insert the default text`, async () => { - await waitFor(async () => { - // click quick menu button - await fixture.events.click( - fixture.editor.canvas.quickActionMenu.insertTextButton - ); - expect(fixture.editor.canvas.framesLayer.frames.length).toBe(2); - expect( - fixture.editor.sidebar.designPanel.selectionSection - ).not.toBeNull(); + // click quick menu button + await fixture.events.click( + fixture.editor.canvas.quickActionMenu.insertTextButton + ); + await fixture.events.sleep(100); + expect(fixture.editor.canvas.framesLayer.frames.length).toBe(2); + expect( + fixture.editor.sidebar.designPanel.selectionSection + ).not.toBeNull(); - expect(document.activeElement).toEqual( - fixture.editor.canvas.framesLayer.frames[1].node - ); - }); + expect(document.activeElement).toEqual( + fixture.editor.canvas.framesLayer.frames[1].node + ); }); it('should allow clicking multiple actions', async () => {