diff --git a/frontend/src/components/common/copyable/copy-to-clipboard-button/copy-to-clipboard-button.test.tsx b/frontend/src/components/common/copyable/copy-to-clipboard-button/copy-to-clipboard-button.test.tsx index b66bab8e2..94cde501f 100644 --- a/frontend/src/components/common/copyable/copy-to-clipboard-button/copy-to-clipboard-button.test.tsx +++ b/frontend/src/components/common/copyable/copy-to-clipboard-button/copy-to-clipboard-button.test.tsx @@ -40,7 +40,7 @@ describe('Copy to clipboard button', () => { const view = render(copyToClipboardButton) expect(view.container).toMatchSnapshot() const button = await screen.findByTitle('renderer.highlightCode.copyCode') - act(() => { + await act(() => { button.click() }) const tooltip = await screen.findByRole('tooltip') diff --git a/frontend/src/components/common/motd-modal/motd-modal.test.tsx b/frontend/src/components/common/motd-modal/motd-modal.test.tsx index c2bd07325..0682fff61 100644 --- a/frontend/src/components/common/motd-modal/motd-modal.test.tsx +++ b/frontend/src/components/common/motd-modal/motd-modal.test.tsx @@ -61,7 +61,7 @@ describe('motd modal', () => { expect(view.container).toMatchSnapshot() const button = await screen.findByTestId('motd-dismiss') - act(() => { + await act(() => { button.click() }) expect(view.container).toMatchSnapshot() diff --git a/frontend/src/components/common/note-loading-boundary/create-non-existing-note-hint.test.tsx b/frontend/src/components/common/note-loading-boundary/create-non-existing-note-hint.test.tsx index cefb55a41..4254f1b52 100644 --- a/frontend/src/components/common/note-loading-boundary/create-non-existing-note-hint.test.tsx +++ b/frontend/src/components/common/note-loading-boundary/create-non-existing-note-hint.test.tsx @@ -77,7 +77,7 @@ describe('create non existing note hint', () => { const onNoteCreatedCallback = jest.fn() const view = render() const button = await screen.findByTestId('createNoteButton') - act(() => { + await act(() => { button.click() }) await screen.findByTestId('loadingMessage') @@ -90,7 +90,7 @@ describe('create non existing note hint', () => { const onNoteCreatedCallback = jest.fn() const view = render() const button = await screen.findByTestId('createNoteButton') - act(() => { + await act(() => { button.click() }) await screen.findByTestId('noteCreated') @@ -103,7 +103,7 @@ describe('create non existing note hint', () => { const onNoteCreatedCallback = jest.fn() const view = render() const button = await screen.findByTestId('createNoteButton') - act(() => { + await act(() => { button.click() }) await screen.findByTestId('failedMessage') diff --git a/frontend/src/components/editor-page/document-bar/aliases/aliases-add-form.test.tsx b/frontend/src/components/editor-page/document-bar/aliases/aliases-add-form.test.tsx index 78f855e5a..244c1775f 100644 --- a/frontend/src/components/editor-page/document-bar/aliases/aliases-add-form.test.tsx +++ b/frontend/src/components/editor-page/document-bar/aliases/aliases-add-form.test.tsx @@ -47,7 +47,7 @@ describe('AliasesAddForm', () => { const input = await screen.findByTestId('addAliasInput') await testEvent.type(input, 'abc') expect(button).toBeEnabled() - act(() => { + await act(() => { button.click() }) expect(AliasModule.addAlias).toBeCalledWith('mock-note', 'abc') diff --git a/frontend/src/components/editor-page/document-bar/aliases/aliases-list-entry.test.tsx b/frontend/src/components/editor-page/document-bar/aliases/aliases-list-entry.test.tsx index 262744e59..7866fb009 100644 --- a/frontend/src/components/editor-page/document-bar/aliases/aliases-list-entry.test.tsx +++ b/frontend/src/components/editor-page/document-bar/aliases/aliases-list-entry.test.tsx @@ -47,7 +47,7 @@ describe('AliasesListEntry', () => { const view = render() expect(view.container).toMatchSnapshot() const button = await screen.findByTestId('aliasButtonRemove') - act(() => { + await act(() => { button.click() }) expect(AliasModule.deleteAlias).toBeCalledWith(testAlias.name) @@ -64,14 +64,14 @@ describe('AliasesListEntry', () => { const view = render() expect(view.container).toMatchSnapshot() const buttonRemove = await screen.findByTestId('aliasButtonRemove') - act(() => { + await act(() => { buttonRemove.click() }) expect(AliasModule.deleteAlias).toBeCalledWith(testAlias.name) await deletePromise expect(NoteDetailsReduxModule.updateMetadata).toBeCalled() const buttonMakePrimary = await screen.findByTestId('aliasButtonMakePrimary') - act(() => { + await act(() => { buttonMakePrimary.click() }) expect(AliasModule.markAliasAsPrimary).toBeCalledWith(testAlias.name) diff --git a/frontend/src/components/layout/settings-dialog/utils/on-off-button-group.test.tsx b/frontend/src/components/layout/settings-dialog/utils/on-off-button-group.test.tsx index 20720d7c1..24ce6897c 100644 --- a/frontend/src/components/layout/settings-dialog/utils/on-off-button-group.test.tsx +++ b/frontend/src/components/layout/settings-dialog/utils/on-off-button-group.test.tsx @@ -18,7 +18,7 @@ describe('Settings On-Off Button Group', () => { const view = render() expect(view.container).toMatchSnapshot() const onButton = await screen.findByTestId('onOffButtonGroupOn') - act(() => { + await act(() => { onButton.click() }) expect(value).toBeTruthy() @@ -26,7 +26,7 @@ describe('Settings On-Off Button Group', () => { view.rerender() expect(view.container).toMatchSnapshot() const offButton = await screen.findByTestId('onOffButtonGroupOff') - act(() => { + await act(() => { offButton.click() }) expect(value).toBeFalsy()