Skip to content

Commit a05ca97

Browse files
authored
Fix e2e icon colour (#30299)
* fix: remove white background on e2e verification icon and put white on the checkmark * test(e2e): add non regression tests * chore: remove unused CSS mask
1 parent 2d92b73 commit a05ca97

File tree

5 files changed

+34
-33
lines changed

5 files changed

+34
-33
lines changed

playwright/e2e/crypto/crypto.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ test.describe("Cryptography", function () {
168168

169169
// Take a snapshot of RoomSummaryCard with a verified E2EE icon
170170
await expect(page.locator(".mx_RightPanel")).toMatchScreenshot("RoomSummaryCard-with-verified-e2ee.png");
171+
await expect(page.locator(".mx_MessageComposer_e2eIcon")).toMatchScreenshot("composer-e2e-icon.png");
171172
},
172173
);
173174

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

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,38 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
4848
return promiseVerificationRequest;
4949
}
5050

51-
test("Verify device with SAS during login", async ({ page, app, credentials, homeserver }) => {
52-
await logIntoElement(page, credentials);
53-
54-
// Launch the verification request between alice and the bot
55-
const verificationRequest = await initiateAliceVerificationRequest(page);
56-
57-
// Handle emoji SAS verification
58-
const infoDialog = page.locator(".mx_InfoDialog");
59-
// the bot chooses to do an emoji verification
60-
const verifier = await verificationRequest.evaluateHandle((request) => request.startVerification("m.sas.v1"));
61-
62-
// Handle emoji request and check that emojis are matching
63-
await doTwoWaySasVerification(page, verifier);
64-
65-
await infoDialog.getByRole("button", { name: "They match" }).click();
66-
await infoDialog.getByRole("button", { name: "Got it" }).click();
67-
68-
// Check that our device is now cross-signed
69-
await checkDeviceIsCrossSigned(app);
70-
71-
// Check that the current device is connected to key backup
72-
// For now we don't check that the backup key is in cache because it's a bit flaky,
73-
// as we need to wait for the secret gossiping to happen.
74-
await checkDeviceIsConnectedKeyBackup(app, expectedBackupVersion, false);
75-
});
51+
test(
52+
"Verify device with SAS during login",
53+
{ tag: "@screenshot" },
54+
async ({ page, app, credentials, homeserver }) => {
55+
await logIntoElement(page, credentials);
56+
57+
// Launch the verification request between alice and the bot
58+
const verificationRequest = await initiateAliceVerificationRequest(page);
59+
60+
// Handle emoji SAS verification
61+
const infoDialog = page.locator(".mx_InfoDialog");
62+
// the bot chooses to do an emoji verification
63+
const verifier = await verificationRequest.evaluateHandle((request) =>
64+
request.startVerification("m.sas.v1"),
65+
);
66+
67+
// Handle emoji request and check that emojis are matching
68+
await doTwoWaySasVerification(page, verifier);
69+
70+
await infoDialog.getByRole("button", { name: "They match" }).click();
71+
await expect(page.locator(".mx_E2EIcon_verified")).toMatchScreenshot("device-verified-e2eIcon.png");
72+
await infoDialog.getByRole("button", { name: "Got it" }).click();
73+
74+
// Check that our device is now cross-signed
75+
await checkDeviceIsCrossSigned(app);
76+
77+
// Check that the current device is connected to key backup
78+
// For now we don't check that the backup key is in cache because it's a bit flaky,
79+
// as we need to wait for the secret gossiping to happen.
80+
await checkDeviceIsConnectedKeyBackup(app, expectedBackupVersion, false);
81+
},
82+
);
7683

7784
// Regression test for https://github.com/element-hq/element-web/issues/29110
7885
test("No toast after verification, even if the secrets take a while to arrive", async ({ page, credentials }) => {
Loading
Loading

res/css/views/rooms/_E2EIcon.pcss

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,10 @@ Please see LICENSE files in the repository root for full details.
5252

5353
.mx_E2EIcon_normal::after {
5454
mask-image: url("$(res)/img/e2e/normal.svg");
55-
background-color: var(--cpd-color-icon-tertiary);
55+
background-color: white;
5656
}
5757

5858
.mx_E2EIcon_verified::after {
5959
mask-image: url("$(res)/img/e2e/verified.svg");
6060
background-color: $e2e-verified-color;
6161
}
62-
63-
// When using the "normal" icon as a background for verified or warning icon,
64-
// it should be slightly smaller than the foreground icon
65-
.mx_E2EIcon_verified, .mx_E2EIcon_warning .mx_E2EIcon_normal::after {
66-
mask-size: 90%;
67-
background-color: white;
68-
}

0 commit comments

Comments
 (0)