@@ -99,14 +99,18 @@ describe("ReleaseAnnouncementStore", () => {
99
99
// Sanity check
100
100
expect ( releaseAnnouncementStore . getReleaseAnnouncement ( ) ) . toBe ( "threadsActivityCentre" ) ;
101
101
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 ( ) ;
103
109
await releaseAnnouncementStore . nextReleaseAnnouncement ( ) ;
104
- // Currently there is only one feature, so the next feature should be null
105
110
expect ( await promise ) . toBeNull ( ) ;
106
- expect ( releaseAnnouncementStore . getReleaseAnnouncement ( ) ) . toBeNull ( ) ;
107
111
108
112
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
110
114
// The release announcement viewing states should be share among all instances (devices in the same account)
111
115
expect ( secondStore . getReleaseAnnouncement ( ) ) . toBeNull ( ) ;
112
116
} ) ;
@@ -118,8 +122,7 @@ describe("ReleaseAnnouncementStore", () => {
118
122
const promise = listenReleaseAnnouncementChanged ( ) ;
119
123
await secondStore . nextReleaseAnnouncement ( ) ;
120
124
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" ) ;
124
127
} ) ;
125
128
} ) ;
0 commit comments