Tweak voice broadcast live icon (#9576)
This commit is contained in:
parent
973513cc75
commit
cf3c899dd1
21 changed files with 262 additions and 73 deletions
|
@ -23,6 +23,7 @@ import { RelationsHelperEvent } from "../../../src/events/RelationsHelper";
|
|||
import { MediaEventHelper } from "../../../src/utils/MediaEventHelper";
|
||||
import {
|
||||
VoiceBroadcastInfoState,
|
||||
VoiceBroadcastLiveness,
|
||||
VoiceBroadcastPlayback,
|
||||
VoiceBroadcastPlaybackEvent,
|
||||
VoiceBroadcastPlaybackState,
|
||||
|
@ -76,6 +77,12 @@ describe("VoiceBroadcastPlayback", () => {
|
|||
});
|
||||
};
|
||||
|
||||
const itShouldHaveLiveness = (liveness: VoiceBroadcastLiveness): void => {
|
||||
it(`should have liveness ${liveness}`, () => {
|
||||
expect(playback.getLiveness()).toBe(liveness);
|
||||
});
|
||||
};
|
||||
|
||||
const startPlayback = () => {
|
||||
beforeEach(async () => {
|
||||
await playback.start();
|
||||
|
@ -187,6 +194,8 @@ describe("VoiceBroadcastPlayback", () => {
|
|||
describe("and calling start", () => {
|
||||
startPlayback();
|
||||
|
||||
itShouldHaveLiveness("grey");
|
||||
|
||||
it("should be in buffering state", () => {
|
||||
expect(playback.getState()).toBe(VoiceBroadcastPlaybackState.Buffering);
|
||||
});
|
||||
|
@ -223,6 +232,7 @@ describe("VoiceBroadcastPlayback", () => {
|
|||
});
|
||||
|
||||
itShouldSetTheStateTo(VoiceBroadcastPlaybackState.Playing);
|
||||
itShouldHaveLiveness("live");
|
||||
|
||||
it("should update the duration", () => {
|
||||
expect(playback.durationSeconds).toBe(2.3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue