mirror of https://github.com/vector-im/riot-web
Clean up Playwright test code related to legacy crypto (#28770)
* Clean up Playwright test code related to legacy crypto Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Tidy further Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/28776/head
parent
cd7cf86b96
commit
baaed75c4b
|
@ -50,8 +50,6 @@ test.describe("Dehydration", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Create dehydrated device", async ({ page, user, app }, workerInfo) => {
|
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)
|
// Create a backup (which will create SSSS, and dehydrated device)
|
||||||
|
|
||||||
const securityTab = await app.settings.openUserSettings("Security & Privacy");
|
const securityTab = await app.settings.openUserSettings("Security & Privacy");
|
||||||
|
|
|
@ -133,8 +133,7 @@ test.describe("Cryptography", function () {
|
||||||
"Encrypted by a device not verified by its owner.",
|
"Encrypted by a device not verified by its owner.",
|
||||||
);
|
);
|
||||||
|
|
||||||
/* In legacy crypto: should show a grey padlock for a message from a deleted device.
|
/* Should show a red padlock for a message from an unverified device.
|
||||||
* In rust crypto: 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
|
* Rust crypto remembers the verification state of the sending device, so it will know that the device was
|
||||||
* unverified, even if it gets deleted. */
|
* unverified, even if it gets deleted. */
|
||||||
// bob deletes his second device
|
// bob deletes his second device
|
||||||
|
@ -168,9 +167,7 @@ test.describe("Cryptography", function () {
|
||||||
await expect(lastE2eIcon).toHaveClass(/mx_EventTile_e2eIcon_warning/);
|
await expect(lastE2eIcon).toHaveClass(/mx_EventTile_e2eIcon_warning/);
|
||||||
await lastE2eIcon.focus();
|
await lastE2eIcon.focus();
|
||||||
await expect(await app.getTooltipForElement(lastE2eIcon)).toContainText(
|
await expect(await app.getTooltipForElement(lastE2eIcon)).toContainText(
|
||||||
workerInfo.project.name === "Legacy Crypto"
|
"Encrypted by a device not verified by its owner.",
|
||||||
? "Encrypted by an unknown or deleted device."
|
|
||||||
: "Encrypted by a device not verified by its owner.",
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ test.describe("migration", function () {
|
||||||
test.use({ displayName: "Alice" });
|
test.use({ displayName: "Alice" });
|
||||||
|
|
||||||
test("Should support migration from legacy crypto", async ({ context, user, page }, workerInfo) => {
|
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();
|
test.slow();
|
||||||
|
|
||||||
// We should see a migration progress bar
|
// We should see a migration progress bar
|
||||||
|
|
|
@ -220,11 +220,7 @@ export async function doTwoWaySasVerification(page: Page, verifier: JSHandle<Ver
|
||||||
for (let i = 0; i < emojis.length; i++) {
|
for (let i = 0; i < emojis.length; i++) {
|
||||||
const emoji = emojis[i];
|
const emoji = emojis[i];
|
||||||
const emojiBlock = emojiBlocks.nth(i);
|
const emojiBlock = emojiBlocks.nth(i);
|
||||||
const textContent = await emojiBlock.textContent();
|
await expect(emojiBlock).toHaveText(emoji[0] + emoji[1]);
|
||||||
// VerificationShowSas munges the case of the emoji descriptions returned by the js-sdk before
|
|
||||||
// displaying them. Once we drop support for legacy crypto, that code can go away, and so can the
|
|
||||||
// case-munging here.
|
|
||||||
expect(textContent.toLowerCase()).toEqual(emoji[0] + emoji[1].toLowerCase());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue