From 48c3d91383ef479477ee69f7b46eba15fa7ad556 Mon Sep 17 00:00:00 2001 From: David Langley Date: Thu, 4 Sep 2025 16:16:41 +0100 Subject: [PATCH] We no longer have the release announcement for the TAC, remove the jest tests. (#30698) * We no longer have the release announcement for the TAC, remove the jest tests. * lint * Trigger checks to fix cla check --- .../spaces/ThreadsActivityCentre-test.tsx | 36 --- .../ThreadsActivityCentre-test.tsx.snap | 246 +----------------- 2 files changed, 9 insertions(+), 273 deletions(-) diff --git a/test/unit-tests/components/views/spaces/ThreadsActivityCentre-test.tsx b/test/unit-tests/components/views/spaces/ThreadsActivityCentre-test.tsx index ed03dc6012..2e722eea3d 100644 --- a/test/unit-tests/components/views/spaces/ThreadsActivityCentre-test.tsx +++ b/test/unit-tests/components/views/spaces/ThreadsActivityCentre-test.tsx @@ -17,9 +17,6 @@ import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext import { stubClient } from "../../../../test-utils"; import { populateThread } from "../../../../test-utils/threads"; import DMRoomMap from "../../../../../src/utils/DMRoomMap"; -import SettingsStore from "../../../../../src/settings/SettingsStore"; -import { SettingLevel } from "../../../../../src/settings/SettingLevel"; -import { Features } from "../../../../../src/settings/Settings.tsx"; describe("ThreadsActivityCentre", () => { const getTACButton = () => { @@ -92,44 +89,11 @@ describe("ThreadsActivityCentre", () => { ); }); - beforeEach(async () => { - await SettingsStore.setValue(Features.ReleaseAnnouncement, null, SettingLevel.DEVICE, false); - }); - it("should render the threads activity centre button", async () => { renderTAC(); expect(getTACButton()).toBeInTheDocument(); }); - it("should render the release announcement", async () => { - // Enable release announcement - await SettingsStore.setValue(Features.ReleaseAnnouncement, null, SettingLevel.DEVICE, true); - - renderTAC(); - expect(document.body).toMatchSnapshot(); - }); - - it("should render not display the tooltip when the release announcement is displayed", async () => { - // Enable release announcement - await SettingsStore.setValue(Features.ReleaseAnnouncement, null, SettingLevel.DEVICE, true); - - renderTAC(); - - // The tooltip should not be displayed - await userEvent.hover(getTACButton()); - expect(screen.queryByRole("tooltip")).toBeNull(); - }); - - it("should close the release announcement when the TAC button is clicked", async () => { - // Enable release announcement - await SettingsStore.setValue(Features.ReleaseAnnouncement, null, SettingLevel.DEVICE, true); - - renderTAC(); - await userEvent.click(getTACButton()); - expect(getTACMenu()).toBeInTheDocument(); - expect(document.body).toMatchSnapshot(); - }); - it("should render the threads activity centre button and the display label", async () => { const { container } = renderTAC({ displayButtonLabel: true }); expect(getTACButton()).toBeInTheDocument(); diff --git a/test/unit-tests/components/views/spaces/__snapshots__/ThreadsActivityCentre-test.tsx.snap b/test/unit-tests/components/views/spaces/__snapshots__/ThreadsActivityCentre-test.tsx.snap index 9bf572b78f..c0a64d5589 100644 --- a/test/unit-tests/components/views/spaces/__snapshots__/ThreadsActivityCentre-test.tsx.snap +++ b/test/unit-tests/components/views/spaces/__snapshots__/ThreadsActivityCentre-test.tsx.snap @@ -2,7 +2,7 @@ exports[`ThreadsActivityCentre renders notifications matching the snapshot 1`] = ` `; -exports[`ThreadsActivityCentre should close the release announcement when the TAC button is clicked 1`] = ` - -