Add release announcement for the new room header (#12802)
This commit is contained in:
parent
bb1b7f1fd0
commit
dafc97fe83
5 changed files with 91 additions and 68 deletions
|
@ -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");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue