Skip to content

Commit

Permalink
Fix flakey viewStory test
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Perez <60019601+josh-signal@users.noreply.github.com>
  • Loading branch information
automated-signal and josh-signal committed Oct 25, 2022
1 parent 330fe32 commit 9b6f83d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ts/test-electron/state/ducks/stories_test.ts
Expand Up @@ -758,10 +758,11 @@ describe('both/state/ducks/stories', () => {
describe('paging through collections of stories', () => {
function getViewedStoryData(
storyId: string,
conversationId?: UUIDStringType
conversationId?: UUIDStringType,
timestampDelta = 0
): StoryDataType {
return {
...getStoryData(storyId, conversationId),
...getStoryData(storyId, conversationId, timestampDelta),
readStatus: ReadStatus.Viewed,
};
}
Expand All @@ -774,9 +775,9 @@ describe('both/state/ducks/stories', () => {
const conversationId1 = UUID.generate().toString();
const getState = getStateFunction(
[
getViewedStoryData(storyId1, conversationId1),
getViewedStoryData(storyId2, conversationId2),
getViewedStoryData(storyId3, conversationId2),
getViewedStoryData(storyId1, conversationId1, 0),
getViewedStoryData(storyId2, conversationId2, 1),
getViewedStoryData(storyId3, conversationId2, 2),
],
{
[conversationId1]: getMockConversation({ id: conversationId1 }),
Expand Down

0 comments on commit 9b6f83d

Please sign in to comment.