From f321265e6e783fbcbf320c4b3b196110381dad5a Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Thu, 4 Apr 2024 03:40:06 +0300 Subject: [PATCH] Use expect with getBy* (#4018) Signed-off-by: Olga Bulat --- frontend/test/unit/specs/components/v-modal.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/test/unit/specs/components/v-modal.spec.js b/frontend/test/unit/specs/components/v-modal.spec.js index 52c3b9624a8..7907438da4d 100644 --- a/frontend/test/unit/specs/components/v-modal.spec.js +++ b/frontend/test/unit/specs/components/v-modal.spec.js @@ -112,7 +112,7 @@ describe("VModal", () => { await doOpen() expect(getDialog()).toBeVisible() - expect(() => screen.getByText(/custom initial focus/i)).not.toThrow() + expect(screen.getByText(/custom initial focus/i)).toHaveFocus() }) it("should hide the modal on escape", async () => {