Skip to content

Commit

Permalink
MM-56014 - Fix type error (#585)
Browse files Browse the repository at this point in the history
* fix threadIDForCurrentCall selector

* Bump wait

---------

Co-authored-by: streamer45 <[email protected]>
  • Loading branch information
cpoile and streamer45 authored Dec 11, 2023
1 parent f5dc9c4 commit 265c20c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion e2e/tests/popout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ test.describe('popout window', () => {
await replyTextbox.press('Enter');

// Verify we left the call.
await devPage.wait(1000);
await devPage.wait(2000);
await expect(popOut.isClosed()).toEqual(true);
await expect(page.locator('#calls-widget')).toBeHidden();
});
Expand Down
13 changes: 9 additions & 4 deletions webapp/src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ export const idForCurrentCall: (state: GlobalState) => string | undefined =
(callsStates, channelID) => callsStates[channelID]?.ID,
);

export const threadIDForCurrentCall: (state: GlobalState) => string | undefined =
createSelector(
'threadIDForCurrentCall',
calls,
channelIDForCurrentCall,
(callsStates, channelID) => callsStates[channelID]?.threadID,
);

export const teamForCurrentCall: (state: GlobalState) => Team | null =
createSelector(
'teamForCurrentCall',
Expand Down Expand Up @@ -159,7 +167,7 @@ export const callStartAtForCurrentCall: (state: GlobalState) => number =
window.opener?.callsClient?.initTime || 0,
);

export const callInCurrentChannel: (state: GlobalState) => callState =
export const callInCurrentChannel: (state: GlobalState) => callState | undefined =
createSelector(
'callInCurrentChannel',
calls,
Expand Down Expand Up @@ -216,9 +224,6 @@ export const threadIDForCallInChannel = (state: GlobalState, channelID: string)
return pluginState(state).calls[channelID]?.threadID || '';
};

export const threadIDForCurrentCall = (state: GlobalState) =>
callInCurrentChannel(state).threadID;

const recordingsForCalls = (state: GlobalState): callsRecordingsState => {
return pluginState(state).recordings;
};
Expand Down

0 comments on commit 265c20c

Please sign in to comment.