Fix e2e warning icon should be white (#30539)

* fix: e2e warning icon should be white

* tests: add e2e warning screenshot test
This commit is contained in:
Florian Duros
2025-08-12 20:26:56 +02:00
committed by GitHub
parent 713f524948
commit 31506ef864
3 changed files with 88 additions and 87 deletions

View File

@@ -58,12 +58,10 @@ test.describe("Cryptography", function () {
await app.client.network.setupRoute(); await app.client.network.setupRoute();
}); });
test("should show the correct shield on e2e events", async ({ test(
page, "should show the correct shield on e2e events",
app, { tag: "@screenshot" },
bot: bob, async ({ page, app, bot: bob, homeserver }, workerInfo) => {
homeserver,
}, workerInfo) => {
// Bob has a second, not cross-signed, device // Bob has a second, not cross-signed, device
const bobSecondDevice = await createSecondBotDevice(page, homeserver, bob); const bobSecondDevice = await createSecondBotDevice(page, homeserver, bob);
@@ -102,6 +100,7 @@ test.describe("Cryptography", function () {
await expect(last).toContainText("test unencrypted"); await expect(last).toContainText("test unencrypted");
await expect(lastE2eIcon).toHaveClass(/mx_EventTile_e2eIcon_warning/); await expect(lastE2eIcon).toHaveClass(/mx_EventTile_e2eIcon_warning/);
await expect(lastE2eIcon).toMatchScreenshot("event-shield-warning.png");
await lastE2eIcon.focus(); await lastE2eIcon.focus();
await expect(await app.getTooltipForElement(lastE2eIcon)).toContainText("Not encrypted"); await expect(await app.getTooltipForElement(lastE2eIcon)).toContainText("Not encrypted");
@@ -159,7 +158,8 @@ test.describe("Cryptography", function () {
await expect(await app.getTooltipForElement(lastE2eIcon)).toContainText( await expect(await app.getTooltipForElement(lastE2eIcon)).toContainText(
"Encrypted by a device not verified by its owner.", "Encrypted by a device not verified by its owner.",
); );
}); },
);
test("Should show a grey padlock for a key restored from backup", async ({ test("Should show a grey padlock for a key restored from backup", async ({
page, page,

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

View File

@@ -55,7 +55,8 @@ Please see LICENSE files in the repository root for full details.
background-color: var(--cpd-color-icon-tertiary); background-color: var(--cpd-color-icon-tertiary);
} }
.mx_E2EIcon_verified { .mx_E2EIcon_verified,
.mx_E2EIcon_warning {
.mx_E2EIcon_normal::after { .mx_E2EIcon_normal::after {
background-color: white; background-color: white;
} }