Skip to content

Commit 758647f

Browse files
committed
fix playwright tests
1 parent 0e875c0 commit 758647f

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

playwright/e2e/crypto/dehydration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test.describe("Dehydration", () => {
3838
// Reset the identity key
3939
const settings = await app.settings.openUserSettings("Encryption");
4040
await settings.getByRole("button", { name: "Verify this device" }).click();
41-
await page.getByRole("button", { name: "Proceed with reset" }).click();
41+
await page.getByRole("button", { name: "Can't confirm?" }).click();
4242
await page.getByRole("button", { name: "Continue" }).click();
4343

4444
// Set up recovery
@@ -106,7 +106,7 @@ test.describe("Dehydration", () => {
106106
await logIntoElement(page, credentials);
107107

108108
// Oh no, we forgot our recovery key - reset our identity
109-
await page.locator(".mx_AuthPage").getByRole("button", { name: "Reset all" }).click();
109+
await page.locator(".mx_AuthPage").getByRole("button", { name: "Can't confirm" }).click();
110110
await expect(
111111
page.getByRole("heading", { name: "Are you sure you want to reset your identity?" }),
112112
).toBeVisible();

playwright/e2e/login/login-consent.spec.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ test.describe("Login", () => {
186186
await page.goto("/");
187187
await login(page, homeserver, credentials);
188188

189-
await expect(page.getByRole("heading", { name: "Verify this device", level: 1 })).toBeVisible();
189+
await expect(page.getByRole("heading", { name: "Confirm your identity", level: 2 })).toBeVisible();
190190

191191
await expect(page.getByRole("button", { name: "Skip verification for now" })).toBeVisible();
192192
});
@@ -219,7 +219,7 @@ test.describe("Login", () => {
219219
await page.goto("/");
220220
await login(page, homeserver, credentials);
221221

222-
await expect(page.getByRole("heading", { name: "Verify this device", level: 1 })).toBeVisible();
222+
await expect(page.getByRole("heading", { name: "Confirm your identity", level: 2 })).toBeVisible();
223223

224224
await expect(page.getByRole("button", { name: "Skip verification for now" })).toBeVisible();
225225
});
@@ -254,10 +254,10 @@ test.describe("Login", () => {
254254
await page.goto("/");
255255
await login(page, homeserver, credentials);
256256

257-
const h1 = page.getByRole("heading", { name: "Verify this device", level: 1 });
258-
await expect(h1).toBeVisible();
257+
const h2 = page.getByRole("heading", { name: "Confirm your identity", level: 2 });
258+
await expect(h2).toBeVisible();
259259

260-
await expect(h1.locator(".mx_CompleteSecurity_skip")).toHaveCount(0);
260+
await expect(h2.locator(".mx_CompleteSecurity_skip")).toHaveCount(0);
261261
});
262262

263263
test("Continues to show verification prompt after cancelling device verification", async ({
@@ -274,8 +274,8 @@ test.describe("Login", () => {
274274
// Load the page and see that we are asked to verify
275275
await page.goto("/#/welcome");
276276
await login(page, homeserver, credentials);
277-
let h1 = page.getByRole("heading", { name: "Verify this device", level: 1 });
278-
await expect(h1).toBeVisible();
277+
let h2 = page.getByRole("heading", { name: "Confirm your identity", level: 2 });
278+
await expect(h2).toBeVisible();
279279

280280
// Click "Use another device"
281281
await page.getByRole("button", { name: "Use another device" }).click();
@@ -284,8 +284,8 @@ test.describe("Login", () => {
284284
await page.getByRole("button", { name: "Close dialog" }).click();
285285

286286
// Check that we are still being asked to verify
287-
h1 = page.getByRole("heading", { name: "Verify this device", level: 1 });
288-
await expect(h1).toBeVisible();
287+
h2 = page.getByRole("heading", { name: "Confirm your identity", level: 2 });
288+
await expect(h2).toBeVisible();
289289
});
290290
});
291291

@@ -303,18 +303,18 @@ test.describe("Login", () => {
303303
await page.goto("/");
304304
await login(page, homeserver, credentials);
305305

306-
await expect(page.getByRole("heading", { name: "Verify this device", level: 1 })).toBeVisible();
306+
await expect(page.getByRole("heading", { name: "Confirm your identity", level: 2 })).toBeVisible();
307307

308308
// Start the reset process
309-
await page.getByRole("button", { name: "Proceed with reset" }).click();
309+
await page.getByRole("button", { name: "Can't confirm?" }).click();
310310

311311
// First try cancelling and restarting
312312
await page.getByRole("button", { name: "Cancel" }).click();
313-
await page.getByRole("button", { name: "Proceed with reset" }).click();
313+
await page.getByRole("button", { name: "Can't confirm?" }).click();
314314

315315
// Then click outside the dialog and restart
316316
await page.getByRole("link", { name: "Powered by Matrix" }).click({ force: true });
317-
await page.getByRole("button", { name: "Proceed with reset" }).click();
317+
await page.getByRole("button", { name: "Can't confirm?" }).click();
318318

319319
// Finally we actually continue
320320
await page.getByRole("button", { name: "Continue" }).click();

playwright/e2e/oidc/oidc-native.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ test.describe("OIDC Native", { tag: ["@no-firefox", "@no-webkit"] }, () => {
133133
await page.getByRole("button", { name: "Continue" }).click();
134134
await page.getByRole("button", { name: "Continue" }).click();
135135

136-
// We should be in (we see an error because we have no recovery key).
137-
await expect(page.getByText("Unable to verify this device")).toBeVisible();
136+
// We should be in
137+
await expect(page.getByText("Confirm your identity")).toBeVisible();
138138
});
139139

140140
test.describe("with force_verification on", () => {
@@ -166,7 +166,7 @@ test.describe("OIDC Native", { tag: ["@no-firefox", "@no-webkit"] }, () => {
166166
await page.getByRole("button", { name: "Continue" }).click();
167167

168168
// We should be being warned that we need to verify (but we can't)
169-
await expect(page.getByText("Unable to verify this device")).toBeVisible();
169+
await expect(page.getByText("Confirm your identity")).toBeVisible();
170170

171171
// And there should be no way to close this prompt
172172
await expect(page.getByRole("button", { name: "Skip verification for now" })).not.toBeVisible();

playwright/e2e/settings/encryption-user-tab/encryption-tab.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ test.describe("Encryption tab", () => {
160160

161161
// We will reset our identity
162162
await settings.getByRole("button", { name: "Verify this device" }).click();
163-
await page.getByRole("button", { name: "Proceed with reset" }).click();
163+
await page.getByRole("button", { name: "Can't confirm?" }).click();
164164

165165
// First try cancelling and restarting
166166
await page.getByRole("button", { name: "Cancel" }).click();
167-
await page.getByRole("button", { name: "Proceed with reset" }).click();
167+
await page.getByRole("button", { name: "Can't confirm?" }).click();
168168

169169
// Then click outside the dialog and restart
170170
await page.locator("li").filter({ hasText: "Encryption" }).click({ force: true });
171-
await page.getByRole("button", { name: "Proceed with reset" }).click();
171+
await page.getByRole("button", { name: "Can't confirm?" }).click();
172172

173173
// Finally we actually continue
174174
await page.getByRole("button", { name: "Continue" }).click();

0 commit comments

Comments
 (0)