Take the Threads Activity Centre out of labs (#12439)
* Take the TAC out of labs! Requires https://github.com/matrix-org/matrix-react-sdk/pull/12438 and ideally https://github.com/matrix-org/matrix-react-sdk/pull/12418 * i18n * Add test method That's needed now we we don't include threads in the notif count in the tests * One less labs setting * Update snapshot * Disable release announcement * Unused import * Fix some screenshots * Fix all the unread test cases now room unreads don't include threads * Fix more tests * Even more test fixes * Still more test fixes * Oh goodness, it's more test fixes * Fix selectors now there are 2 buttons called Threads * Disable some tests that aren't passing for reasons that don't appear releated to any of the TAC work, as per the comment. * Remove debugging * Oops, removed too much
This commit is contained in:
parent
02e7fb340e
commit
281916fd96
20 changed files with 341 additions and 200 deletions
|
@ -61,6 +61,7 @@ import SettingsStore from "../../../src/settings/SettingsStore";
|
|||
import { SettingLevel } from "../../../src/settings/SettingLevel";
|
||||
import { MatrixClientPeg as peg } from "../../../src/MatrixClientPeg";
|
||||
import DMRoomMap from "../../../src/utils/DMRoomMap";
|
||||
import { ReleaseAnnouncementStore } from "../../../src/stores/ReleaseAnnouncementStore";
|
||||
|
||||
jest.mock("matrix-js-sdk/src/oidc/authorize", () => ({
|
||||
completeAuthorizationCodeGrant: jest.fn(),
|
||||
|
@ -627,6 +628,12 @@ describe("<MatrixChat />", () => {
|
|||
(id) => [room, spaceRoom].find((room) => room.roomId === id) || null,
|
||||
);
|
||||
jest.spyOn(spaceRoom, "isSpaceRoom").mockReturnValue(true);
|
||||
|
||||
jest.spyOn(ReleaseAnnouncementStore.instance, "getReleaseAnnouncement").mockReturnValue(null);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
|
||||
describe("leave_room", () => {
|
||||
|
|
|
@ -60,7 +60,7 @@ describe("<LabsUserSettingsTab />", () => {
|
|||
// non-beta labs section
|
||||
expect(screen.getByText("Early previews")).toBeInTheDocument();
|
||||
const labsSections = container.getElementsByClassName("mx_SettingsSubsection");
|
||||
expect(labsSections).toHaveLength(11);
|
||||
expect(labsSections).toHaveLength(10);
|
||||
});
|
||||
|
||||
describe("Rust crypto setting", () => {
|
||||
|
|
|
@ -225,6 +225,48 @@ exports[`<SpacePanel /> should show all activated MetaSpaces in the correct orde
|
|||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div
|
||||
class="mx_ThreadsActivityCentre_container"
|
||||
>
|
||||
<button
|
||||
aria-controls="floating-ui-7"
|
||||
aria-expanded="true"
|
||||
aria-haspopup="dialog"
|
||||
aria-label="Threads"
|
||||
class="_icon-button_16nk7_17 mx_ThreadsActivityCentreButton"
|
||||
data-state="closed"
|
||||
role="button"
|
||||
style="--cpd-icon-button-size: 32px;"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="_indicator-icon_133tf_26"
|
||||
style="--cpd-icon-button-size: 100%;"
|
||||
>
|
||||
<div
|
||||
class="mx_ThreadsActivityCentreButton_Icon"
|
||||
/>
|
||||
</div>
|
||||
</button>
|
||||
<span
|
||||
data-floating-ui-focus-guard=""
|
||||
data-type="outside"
|
||||
role="button"
|
||||
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
|
||||
tabindex="0"
|
||||
/>
|
||||
<span
|
||||
aria-owns="undefined"
|
||||
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
|
||||
/>
|
||||
<span
|
||||
data-floating-ui-focus-guard=""
|
||||
data-type="outside"
|
||||
role="button"
|
||||
style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: fixed; white-space: nowrap; width: 1px; top: 0px; left: 0px;"
|
||||
tabindex="0"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-label="Quick settings"
|
||||
|
|
|
@ -622,6 +622,7 @@ export function mkStubRoom(
|
|||
getType: jest.fn().mockReturnValue(undefined),
|
||||
getUnfilteredTimelineSet: jest.fn(),
|
||||
getUnreadNotificationCount: jest.fn(() => 0),
|
||||
getRoomUnreadNotificationCount: jest.fn().mockReturnValue(0),
|
||||
getVersion: jest.fn().mockReturnValue("1"),
|
||||
hasMembershipState: () => false,
|
||||
isElementVideoRoom: jest.fn().mockReturnValue(false),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue