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
This commit is contained in:
@@ -168,6 +168,7 @@ test.describe("Cryptography", function () {
|
|||||||
|
|
||||||
// Take a snapshot of RoomSummaryCard with a verified E2EE icon
|
// Take a snapshot of RoomSummaryCard with a verified E2EE icon
|
||||||
await expect(page.locator(".mx_RightPanel")).toMatchScreenshot("RoomSummaryCard-with-verified-e2ee.png");
|
await expect(page.locator(".mx_RightPanel")).toMatchScreenshot("RoomSummaryCard-with-verified-e2ee.png");
|
||||||
|
await expect(page.locator(".mx_MessageComposer_e2eIcon")).toMatchScreenshot("composer-e2e-icon.png");
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -48,31 +48,38 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
|
|||||||
return promiseVerificationRequest;
|
return promiseVerificationRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
test("Verify device with SAS during login", async ({ page, app, credentials, homeserver }) => {
|
test(
|
||||||
await logIntoElement(page, credentials);
|
"Verify device with SAS during login",
|
||||||
|
{ tag: "@screenshot" },
|
||||||
|
async ({ page, app, credentials, homeserver }) => {
|
||||||
|
await logIntoElement(page, credentials);
|
||||||
|
|
||||||
// Launch the verification request between alice and the bot
|
// Launch the verification request between alice and the bot
|
||||||
const verificationRequest = await initiateAliceVerificationRequest(page);
|
const verificationRequest = await initiateAliceVerificationRequest(page);
|
||||||
|
|
||||||
// Handle emoji SAS verification
|
// Handle emoji SAS verification
|
||||||
const infoDialog = page.locator(".mx_InfoDialog");
|
const infoDialog = page.locator(".mx_InfoDialog");
|
||||||
// the bot chooses to do an emoji verification
|
// the bot chooses to do an emoji verification
|
||||||
const verifier = await verificationRequest.evaluateHandle((request) => request.startVerification("m.sas.v1"));
|
const verifier = await verificationRequest.evaluateHandle((request) =>
|
||||||
|
request.startVerification("m.sas.v1"),
|
||||||
|
);
|
||||||
|
|
||||||
// Handle emoji request and check that emojis are matching
|
// Handle emoji request and check that emojis are matching
|
||||||
await doTwoWaySasVerification(page, verifier);
|
await doTwoWaySasVerification(page, verifier);
|
||||||
|
|
||||||
await infoDialog.getByRole("button", { name: "They match" }).click();
|
await infoDialog.getByRole("button", { name: "They match" }).click();
|
||||||
await infoDialog.getByRole("button", { name: "Got it" }).click();
|
await expect(page.locator(".mx_E2EIcon_verified")).toMatchScreenshot("device-verified-e2eIcon.png");
|
||||||
|
await infoDialog.getByRole("button", { name: "Got it" }).click();
|
||||||
|
|
||||||
// Check that our device is now cross-signed
|
// Check that our device is now cross-signed
|
||||||
await checkDeviceIsCrossSigned(app);
|
await checkDeviceIsCrossSigned(app);
|
||||||
|
|
||||||
// Check that the current device is connected to key backup
|
// Check that the current device is connected to key backup
|
||||||
// For now we don't check that the backup key is in cache because it's a bit flaky,
|
// For now we don't check that the backup key is in cache because it's a bit flaky,
|
||||||
// as we need to wait for the secret gossiping to happen.
|
// as we need to wait for the secret gossiping to happen.
|
||||||
await checkDeviceIsConnectedKeyBackup(app, expectedBackupVersion, false);
|
await checkDeviceIsConnectedKeyBackup(app, expectedBackupVersion, false);
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// Regression test for https://github.com/element-hq/element-web/issues/29110
|
// Regression test for https://github.com/element-hq/element-web/issues/29110
|
||||||
test("No toast after verification, even if the secrets take a while to arrive", async ({ page, credentials }) => {
|
test("No toast after verification, even if the secrets take a while to arrive", async ({ page, credentials }) => {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 367 B |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -52,17 +52,10 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
|
|
||||||
.mx_E2EIcon_normal::after {
|
.mx_E2EIcon_normal::after {
|
||||||
mask-image: url("$(res)/img/e2e/normal.svg");
|
mask-image: url("$(res)/img/e2e/normal.svg");
|
||||||
background-color: var(--cpd-color-icon-tertiary);
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_E2EIcon_verified::after {
|
.mx_E2EIcon_verified::after {
|
||||||
mask-image: url("$(res)/img/e2e/verified.svg");
|
mask-image: url("$(res)/img/e2e/verified.svg");
|
||||||
background-color: $e2e-verified-color;
|
background-color: $e2e-verified-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// When using the "normal" icon as a background for verified or warning icon,
|
|
||||||
// it should be slightly smaller than the foreground icon
|
|
||||||
.mx_E2EIcon_verified, .mx_E2EIcon_warning .mx_E2EIcon_normal::after {
|
|
||||||
mask-size: 90%;
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user