Skip to content

Commit 6d02873

Browse files
committed
fix more playwright tests
1 parent 851f929 commit 6d02873

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

playwright/e2e/crypto/device-verification.spec.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
169169

170170
// Fill the passphrase
171171
const dialog = page.locator(".mx_Dialog");
172-
await dialog.locator("input").fill("new passphrase");
173-
await dialog.locator(".mx_Dialog_primary:not([disabled])", { hasText: "Continue" }).click();
172+
await dialog.locator("textarea").fill("new passphrase");
173+
await dialog.getByRole("button", { name: "Continue", disabled: false }).click();
174174

175175
await page.locator(".mx_AuthPage").getByRole("button", { name: "Done" }).click();
176176

@@ -190,10 +190,9 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
190190

191191
// Fill the recovery key
192192
const dialog = page.locator(".mx_Dialog");
193-
await dialog.getByRole("button", { name: "use your Recovery Key" }).click();
194193
const aliceRecoveryKey = await aliceBotClient.getRecoveryKey();
195-
await dialog.locator("#mx_securityKey").fill(aliceRecoveryKey.encodedPrivateKey);
196-
await dialog.locator(".mx_Dialog_primary:not([disabled])", { hasText: "Continue" }).click();
194+
await dialog.locator("textarea").fill(aliceRecoveryKey.encodedPrivateKey);
195+
await dialog.getByRole("button", { name: "Continue", disabled: false }).click();
197196

198197
await page.locator(".mx_AuthPage").getByRole("button", { name: "Done" }).click();
199198

playwright/e2e/crypto/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ export async function logIntoElement(page: Page, credentials: Credentials, secur
228228
await useSecurityKey.click();
229229
}
230230
// Fill in the recovery key
231-
await page.locator(".mx_Dialog").locator('input[type="password"]').fill(securityKey);
232-
await page.locator(".mx_Dialog_primary:not([disabled])", { hasText: "Continue" }).click();
231+
await page.locator(".mx_Dialog").locator("textarea").fill(securityKey);
232+
await page.getByRole("button", { name: "Continue", disabled: false }).click();
233233
await page.getByRole("button", { name: "Done" }).click();
234234
}
235235
}

0 commit comments

Comments
 (0)