diff --git a/src/test/e2e/chat.test.ts b/src/test/e2e/chat.test.ts index 39029671..dc934ae8 100644 --- a/src/test/e2e/chat.test.ts +++ b/src/test/e2e/chat.test.ts @@ -34,13 +34,11 @@ e2e("Chat - can send messages and switch between modes", async ({ helper, sideba // === slash commands preserve following text === await expect(inputbox).toHaveValue("") // Type partial slash command to trigger menu - await inputbox.pressSequentially("/new", { delay: 100 }) + await inputbox.fill("/newt") - // Wait for the slash commands menu to be visible - await sidebar.getByTestId("slash-commands-menu").waitFor({ state: "visible" }) - - // Wait for menu to be visible and select first option with Tab - await inputbox.press("Tab") + // Wait for menu to be visible and click on menu item + await inputbox.focus() + await sidebar.getByText("newtask", { exact: false }).click() await expect(inputbox).toHaveValue("/newtask ") // Add following text to verify it works correctly @@ -52,10 +50,10 @@ e2e("Chat - can send messages and switch between modes", async ({ helper, sideba await expect(inputbox).toHaveValue("") // Type partial @ mention to trigger menu - await inputbox.pressSequentially("@prob") + await inputbox.fill("@prob") - // Wait for menu to be visible and select first option with Tab - await inputbox.press("Tab") + // Wait for menu to be visible and click on menu item + await sidebar.getByText("Problems", { exact: false }).first().click() await expect(inputbox).toHaveValue("@problems ") // Add following text to verify it works correctly