-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test placing a call in a group call #2593
Conversation
Refactors a bit of the call testing stuff Fixes element-hq/element-call#521
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking awesome!
spec/unit/webrtc/groupCall.spec.ts
Outdated
expect(mockSendState.mock.calls[0][0]).toEqual(FAKE_ROOM_ID); | ||
expect(mockSendState.mock.calls[0][1]).toEqual(EventType.GroupCallPrefix); | ||
expect(mockSendState.mock.calls[0][2]["m.type"]).toEqual(GroupCallType.Video); | ||
expect(mockSendState.mock.calls[0][2]["m.intent"]).toEqual(GroupCallIntent.Prompt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to use toHaveBeenCalledWith()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I managed to replace one with that using expect.objectContaining(), although it seemed to confuse the other ones.
spec/unit/webrtc/groupCall.spec.ts
Outdated
} | ||
}); | ||
|
||
it("unmutes audio", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am struggling to see what exactly this is doing/why it has this name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fairly basic and just asserts that calling the mute API correctly disables the stream. I've updated the name to maybe make it clearer.
spec/unit/webrtc/groupCall.spec.ts
Outdated
} | ||
}); | ||
|
||
it("unmutes video", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am struggling to see what exactly this is doing/why it has this name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have likewise updated the name, (but yes, it's still perhaps a bit of silly test, but easy to write).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have the one comment about the assertion in disables audio stream when audio is set to muted
, but otherwise looks good
Oh, so you did - github had hidden it for me :/ |
Refactors a bit of the call testing stuff
Fixes element-hq/element-call#521
Checklist
This change is marked as an internal change (Task), so will not be included in the changelog.