This commit is contained in:
Hugh Nimmo-Smith
2024-11-18 17:50:59 +00:00
parent 5cae84940e
commit 09de97637c

View File

@@ -248,7 +248,7 @@ function withCallViewModel(
}
test("participants are retained during a focus switch", () => {
withTestScheduler(({ cold, expectObservable }) => {
withTestScheduler(({ hot, expectObservable }) => {
// Participants disappear on frame 2 and come back on frame 3
const participantMarbles = "a-ba";
// Start switching focus on frame 1 and reconnect on frame 3
@@ -257,12 +257,12 @@ test("participants are retained during a focus switch", () => {
const layoutMarbles = " a";
withCallViewModel(
cold(participantMarbles, {
hot(participantMarbles, {
a: [aliceParticipant, bobParticipant],
b: [],
}),
of([aliceRtcMember, bobRtcMember]),
cold(connectionMarbles, {
hot(connectionMarbles, {
c: ConnectionState.Connected,
s: ECAddonConnectionState.ECSwitchingFocus,
}),
@@ -281,7 +281,7 @@ test("participants are retained during a focus switch", () => {
});
test("screen sharing activates spotlight layout", () => {
withTestScheduler(({ cold, schedule, expectObservable }) => {
withTestScheduler(({ hot, schedule, expectObservable }) => {
// Start with no screen shares, then have Alice and Bob share their screens,
// then return to no screen shares, then have just Alice share for a bit
const participantMarbles = " abcda-ba";
@@ -294,7 +294,7 @@ test("screen sharing activates spotlight layout", () => {
const layoutMarbles = " abcdaefeg";
const showSpeakingMarbles = "y----nyny";
withCallViewModel(
cold(participantMarbles, {
hot(participantMarbles, {
a: [aliceParticipant, bobParticipant],
b: [aliceSharingScreen, bobParticipant],
c: [aliceSharingScreen, bobSharingScreen],
@@ -417,7 +417,7 @@ test("participants stay in the same order unless to appear/disappear", () => {
});
test("spotlight speakers swap places", () => {
withTestScheduler(({ cold, schedule, expectObservable }) => {
withTestScheduler(({ hot, schedule, expectObservable }) => {
// Go immediately into spotlight mode for the test
const modeMarbles = " s";
// First Bob speaks, then Dave, then Alice
@@ -435,9 +435,9 @@ test("spotlight speakers swap places", () => {
of([aliceRtcMember, bobRtcMember, daveRtcMember]),
of(ConnectionState.Connected),
new Map([
[aliceParticipant, cold(aSpeakingMarbles, { y: true, n: false })],
[bobParticipant, cold(bSpeakingMarbles, { y: true, n: false })],
[daveParticipant, cold(dSpeakingMarbles, { y: true, n: false })],
[aliceParticipant, hot(aSpeakingMarbles, { y: true, n: false })],
[bobParticipant, hot(bSpeakingMarbles, { y: true, n: false })],
[daveParticipant, hot(dSpeakingMarbles, { y: true, n: false })],
]),
(vm) => {
schedule(modeMarbles, { s: () => vm.setGridMode("spotlight") });