From d9e943d9a84abd55bde2f649d22b73d29b9b0c7d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 15 Oct 2024 09:56:43 +0100 Subject: [PATCH] Update to Compound v7 (#151) * Update to Compound v7 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- package.json | 2 +- playwright/e2e/crypto/crypto.spec.ts | 2 +- .../views/right_panel/RoomSummaryCard.tsx | 8 +++--- .../RoomSummaryCard-test.tsx.snap | 12 ++++---- yarn.lock | 28 +++++++++++++++---- 5 files changed, 34 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 8f9e6fdc88..cc8b13b4b5 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@sentry/browser": "^8.0.0", "@testing-library/react-hooks": "^8.0.1", "@vector-im/compound-design-tokens": "^1.8.0", - "@vector-im/compound-web": "^6.3.1", + "@vector-im/compound-web": "^7.0.0", "@zxcvbn-ts/core": "^3.0.4", "@zxcvbn-ts/language-common": "^3.0.4", "@zxcvbn-ts/language-en": "^3.0.2", diff --git a/playwright/e2e/crypto/crypto.spec.ts b/playwright/e2e/crypto/crypto.spec.ts index e520d971ea..e3285b898d 100644 --- a/playwright/e2e/crypto/crypto.spec.ts +++ b/playwright/e2e/crypto/crypto.spec.ts @@ -226,7 +226,7 @@ test.describe("Cryptography", function () { // Assert that verified icon is rendered await page.getByTestId("base-card-back-button").click(); await page.getByLabel("Room info").nth(1).click(); - await expect(page.locator('.mx_RoomSummaryCard_badges [data-kind="success"]')).toContainText("Encrypted"); + await expect(page.locator('.mx_RoomSummaryCard_badges [data-kind="green"]')).toContainText("Encrypted"); // Take a snapshot of RoomSummaryCard with a verified E2EE icon await expect(page.locator(".mx_RightPanel")).toMatchScreenshot("RoomSummaryCard-with-verified-e2ee.png"); diff --git a/src/components/views/right_panel/RoomSummaryCard.tsx b/src/components/views/right_panel/RoomSummaryCard.tsx index 7b39ee0c57..664977bbe2 100644 --- a/src/components/views/right_panel/RoomSummaryCard.tsx +++ b/src/components/views/right_panel/RoomSummaryCard.tsx @@ -297,28 +297,28 @@ const RoomSummaryCard: React.FC = ({ {!isDirectMessage && roomState.getJoinRule() === JoinRule.Public && ( - + {_t("common|public_room")} )} {isRoomEncrypted && e2eStatus !== E2EStatus.Warning && ( - + {_t("common|encrypted")} )} {!e2eStatus && ( - + {_t("common|unencrypted")} )} {e2eStatus === E2EStatus.Warning && ( - + {_t("common|not_trusted")} diff --git a/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap b/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap index 487933f012..3cd402653a 100644 --- a/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap +++ b/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap @@ -72,8 +72,8 @@ exports[` has button to edit topic 1`] = ` style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: center; --mx-flex-gap: var(--cpd-space-2x);" > renders the room summary 1`] = ` style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: center; --mx-flex-gap: var(--cpd-space-2x);" > renders the room topic in the summary 1`] = ` style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: start; --mx-flex-justify: center; --mx-flex-gap: var(--cpd-space-2x);" >