Skip to content

Commit fa0af64

Browse files
committed
Fix Playwright tests in Firefox
As explained by the comment.
1 parent dc5d136 commit fa0af64

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

playwright/fixtures/widget-user.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,13 @@ export const widgetTest = test.extend<MyFixtures>({
154154
ewPage1.getByRole("heading", { name: "Invite to Welcome Room" }),
155155
).toBeVisible();
156156

157-
await ewPage1.getByRole("textbox").fill(whistlerMxId);
158-
await ewPage1.getByRole("textbox").click();
157+
// To get the invite textbox we need to specifically select within the
158+
// dialog, since there is another textbox in the background (the message
159+
// composer). In theory the composer shouldn't be visible to Playwright at
160+
// all because the invite dialog has trapped focus, but the focus trap
161+
// doesn't quite work right on Firefox.
162+
await ewPage1.getByRole("dialog").getByRole("textbox").fill(whistlerMxId);
163+
await ewPage1.getByRole("dialog").getByRole("textbox").click();
159164
await ewPage1.getByRole("button", { name: "Invite" }).click();
160165

161166
// Accept the invite

0 commit comments

Comments
 (0)