From 249c0fd1df0ae315016abca0236619fe674854cf Mon Sep 17 00:00:00 2001 From: David Langley Date: Fri, 18 Oct 2024 18:13:20 +0100 Subject: [PATCH] Fix RTE mentions autocomplete test (#28244) LeftArrow -> ArrowLeft --- playwright/e2e/composer/RTE.spec.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/playwright/e2e/composer/RTE.spec.ts b/playwright/e2e/composer/RTE.spec.ts index d76a337316..91a56afb8a 100644 --- a/playwright/e2e/composer/RTE.spec.ts +++ b/playwright/e2e/composer/RTE.spec.ts @@ -96,8 +96,7 @@ test.describe("Composer", () => { }, }); - // https://github.com/vector-im/element-web/issues/26037 - test.skip("autocomplete behaviour tests", async ({ page, app, bot: bob }) => { + test("autocomplete behaviour tests", async ({ page, app, bot: bob }) => { // Set up a private room so we have another user to mention await app.client.createRoom({ is_direct: true, @@ -138,10 +137,10 @@ test.describe("Composer", () => { .pressSequentially(`initial text @${bob.credentials.displayName.slice(0, 1)} abc`); await expect(page.getByTestId("autocomplete-wrapper")).toBeEmpty(); // Move the cursor left by 4 to put it to: `@B| abc`, check autocomplete displays - await page.getByRole("textbox").press("LeftArrow"); - await page.getByRole("textbox").press("LeftArrow"); - await page.getByRole("textbox").press("LeftArrow"); - await page.getByRole("textbox").press("LeftArrow"); + await page.getByRole("textbox").press("ArrowLeft"); + await page.getByRole("textbox").press("ArrowLeft"); + await page.getByRole("textbox").press("ArrowLeft"); + await page.getByRole("textbox").press("ArrowLeft"); await expect(page.getByTestId("autocomplete-wrapper")).not.toBeEmpty(); // Selecting the autocomplete option using Enter inserts it into the composer