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

Commit

Permalink
Fix test again
Browse files Browse the repository at this point in the history
  • Loading branch information
MidhunSureshR committed Jul 23, 2024
1 parent 9edd670 commit bdbb505
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/stores/ReleaseAnnouncementStore-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
expect(await promise).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();
});
Expand Down

0 comments on commit bdbb505

Please sign in to comment.