From e45f10f1fc7f4d63015671e4c569f00c5434dbb3 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 18 Dec 2024 23:23:46 +0000 Subject: [PATCH 1/2] Clean up Playwright test code related to legacy crypto Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- playwright/e2e/crypto/dehydration.spec.ts | 2 -- playwright/e2e/crypto/event-shields.spec.ts | 7 ++----- playwright/e2e/crypto/migration.spec.ts | 1 - playwright/e2e/crypto/utils.ts | 5 +---- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/playwright/e2e/crypto/dehydration.spec.ts b/playwright/e2e/crypto/dehydration.spec.ts index 590ab774b50..97c5ad332d9 100644 --- a/playwright/e2e/crypto/dehydration.spec.ts +++ b/playwright/e2e/crypto/dehydration.spec.ts @@ -50,8 +50,6 @@ test.describe("Dehydration", () => { }); test("Create dehydrated device", async ({ page, user, app }, workerInfo) => { - test.skip(workerInfo.project.name === "Legacy Crypto", "This test only works with Rust crypto."); - // Create a backup (which will create SSSS, and dehydrated device) const securityTab = await app.settings.openUserSettings("Security & Privacy"); diff --git a/playwright/e2e/crypto/event-shields.spec.ts b/playwright/e2e/crypto/event-shields.spec.ts index 0beb8e36500..da9fe1fd1a3 100644 --- a/playwright/e2e/crypto/event-shields.spec.ts +++ b/playwright/e2e/crypto/event-shields.spec.ts @@ -133,8 +133,7 @@ test.describe("Cryptography", function () { "Encrypted by a device not verified by its owner.", ); - /* In legacy crypto: should show a grey padlock for a message from a deleted device. - * In rust crypto: should show a red padlock for a message from an unverified device. + /* Should show a red padlock for a message from an unverified device. * Rust crypto remembers the verification state of the sending device, so it will know that the device was * unverified, even if it gets deleted. */ // bob deletes his second device @@ -168,9 +167,7 @@ test.describe("Cryptography", function () { await expect(lastE2eIcon).toHaveClass(/mx_EventTile_e2eIcon_warning/); await lastE2eIcon.focus(); await expect(await app.getTooltipForElement(lastE2eIcon)).toContainText( - workerInfo.project.name === "Legacy Crypto" - ? "Encrypted by an unknown or deleted device." - : "Encrypted by a device not verified by its owner.", + "Encrypted by a device not verified by its owner.", ); }); diff --git a/playwright/e2e/crypto/migration.spec.ts b/playwright/e2e/crypto/migration.spec.ts index 048b39f06a5..6541d7812b5 100644 --- a/playwright/e2e/crypto/migration.spec.ts +++ b/playwright/e2e/crypto/migration.spec.ts @@ -29,7 +29,6 @@ test.describe("migration", function () { test.use({ displayName: "Alice" }); test("Should support migration from legacy crypto", async ({ context, user, page }, workerInfo) => { - test.skip(workerInfo.project.name === "Legacy Crypto", "This test only works with Rust crypto."); test.slow(); // We should see a migration progress bar diff --git a/playwright/e2e/crypto/utils.ts b/playwright/e2e/crypto/utils.ts index 94b1933977e..b0141060bd2 100644 --- a/playwright/e2e/crypto/utils.ts +++ b/playwright/e2e/crypto/utils.ts @@ -221,10 +221,7 @@ export async function doTwoWaySasVerification(page: Page, verifier: JSHandle Date: Thu, 19 Dec 2024 09:28:23 +0000 Subject: [PATCH 2/2] Tidy further Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- playwright/e2e/crypto/utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playwright/e2e/crypto/utils.ts b/playwright/e2e/crypto/utils.ts index b0141060bd2..337ff3d6344 100644 --- a/playwright/e2e/crypto/utils.ts +++ b/playwright/e2e/crypto/utils.ts @@ -220,8 +220,7 @@ export async function doTwoWaySasVerification(page: Page, verifier: JSHandle