Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 007ab5f

Browse files
committed
Update tests
1 parent bf94340 commit 007ab5f

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

test/components/views/rooms/__snapshots__/RoomHeader-test.tsx.snap

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ exports[`RoomHeader does not show the face pile for DMs 1`] = `
77
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-3x);"
88
>
99
<button
10+
aria-expanded="false"
11+
aria-haspopup="dialog"
1012
aria-label="Room info"
1113
class="mx_RoomHeader_infoWrapper"
1214
tabindex="0"

test/stores/ReleaseAnnouncementStore-test.tsx

+10-7
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,18 @@ describe("ReleaseAnnouncementStore", () => {
9999
// Sanity check
100100
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("threadsActivityCentre");
101101

102-
const promise = listenReleaseAnnouncementChanged();
102+
let promise = listenReleaseAnnouncementChanged();
103+
await releaseAnnouncementStore.nextReleaseAnnouncement();
104+
105+
expect(await promise).toBe("newRoomHeader");
106+
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("newRoomHeader");
107+
108+
promise = listenReleaseAnnouncementChanged();
103109
await releaseAnnouncementStore.nextReleaseAnnouncement();
104-
// Currently there is only one feature, so the next feature should be null
105110
expect(await promise).toBeNull();
106-
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBeNull();
107111

108112
const secondStore = new ReleaseAnnouncementStore();
109-
// The TAC release announcement has been viewed, so it should be updated in the store account
113+
// All the release announcements have been viewed, so it should be updated in the store account
110114
// The release announcement viewing states should be share among all instances (devices in the same account)
111115
expect(secondStore.getReleaseAnnouncement()).toBeNull();
112116
});
@@ -118,8 +122,7 @@ describe("ReleaseAnnouncementStore", () => {
118122
const promise = listenReleaseAnnouncementChanged();
119123
await secondStore.nextReleaseAnnouncement();
120124

121-
// Currently there is only one feature, so the next feature should be null
122-
expect(await promise).toBeNull();
123-
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBeNull();
125+
expect(await promise).toBe("newRoomHeader");
126+
expect(releaseAnnouncementStore.getReleaseAnnouncement()).toBe("newRoomHeader");
124127
});
125128
});

0 commit comments

Comments
 (0)