You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Add release announcement for the new room header (#12802)
This commit is contained in:
@ -7,6 +7,8 @@ exports[`RoomHeader does not show the face pile for DMs 1`] = `
|
||||
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-3x);"
|
||||
>
|
||||
<button
|
||||
aria-expanded="false"
|
||||
aria-haspopup="dialog"
|
||||
aria-label="Room info"
|
||||
class="mx_RoomHeader_infoWrapper"
|
||||
tabindex="0"
|
||||
|
@ -99,14 +99,18 @@ describe("ReleaseAnnouncementStore", () => {
|
||||
// Sanity check
|
||||
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("threadsActivityCentre");
|
||||
|
||||
const promise = listenReleaseAnnouncementChanged();
|
||||
let promise = listenReleaseAnnouncementChanged();
|
||||
await releaseAnnouncementStore.nextReleaseAnnouncement();
|
||||
|
||||
expect(await promise).toBe("newRoomHeader");
|
||||
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("newRoomHeader");
|
||||
|
||||
promise = listenReleaseAnnouncementChanged();
|
||||
await releaseAnnouncementStore.nextReleaseAnnouncement();
|
||||
// Currently there is only one feature, so the next feature should be null
|
||||
expect(await promise).toBeNull();
|
||||
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBeNull();
|
||||
|
||||
const secondStore = new ReleaseAnnouncementStore();
|
||||
// The TAC release announcement has been viewed, so it should be updated in the store account
|
||||
// All the release announcements have been viewed, so it should be updated in the store account
|
||||
// The release announcement viewing states should be share among all instances (devices in the same account)
|
||||
expect(secondStore.getReleaseAnnouncement()).toBeNull();
|
||||
});
|
||||
@ -118,8 +122,7 @@ describe("ReleaseAnnouncementStore", () => {
|
||||
const promise = listenReleaseAnnouncementChanged();
|
||||
await secondStore.nextReleaseAnnouncement();
|
||||
|
||||
// Currently there is only one feature, so the next feature should be null
|
||||
expect(await promise).toBeNull();
|
||||
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBeNull();
|
||||
expect(await promise).toBe("newRoomHeader");
|
||||
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("newRoomHeader");
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user