Replace Icon with webpack loaded SVG (#9464)
This commit is contained in:
parent
6fe8744e4d
commit
3c9ba3e69f
32 changed files with 298 additions and 564 deletions
|
@ -64,9 +64,6 @@ describe("VoiceBroadcastPlaybackBody", () => {
|
|||
describe("when rendering a buffering voice broadcast", () => {
|
||||
beforeEach(() => {
|
||||
mocked(playback.getState).mockReturnValue(VoiceBroadcastPlaybackState.Buffering);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
renderResult = render(<VoiceBroadcastPlaybackBody playback={playback} />);
|
||||
});
|
||||
|
||||
|
@ -75,18 +72,15 @@ describe("VoiceBroadcastPlaybackBody", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("when rendering a broadcast", () => {
|
||||
describe(`when rendering a ${VoiceBroadcastPlaybackState.Stopped} broadcast`, () => {
|
||||
beforeEach(() => {
|
||||
mocked(playback.getState).mockReturnValue(VoiceBroadcastPlaybackState.Stopped);
|
||||
renderResult = render(<VoiceBroadcastPlaybackBody playback={playback} />);
|
||||
});
|
||||
|
||||
it("should render as expected", () => {
|
||||
expect(renderResult.container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
describe("and clicking the play button", () => {
|
||||
beforeEach(async () => {
|
||||
await userEvent.click(renderResult.getByLabelText("resume voice broadcast"));
|
||||
await userEvent.click(renderResult.getByLabelText("play voice broadcast"));
|
||||
});
|
||||
|
||||
it("should toggle the recording", () => {
|
||||
|
@ -94,4 +88,18 @@ describe("VoiceBroadcastPlaybackBody", () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe.each([
|
||||
VoiceBroadcastPlaybackState.Paused,
|
||||
VoiceBroadcastPlaybackState.Playing,
|
||||
])("when rendering a %s broadcast", (playbackState: VoiceBroadcastPlaybackState) => {
|
||||
beforeEach(() => {
|
||||
mocked(playback.getState).mockReturnValue(playbackState);
|
||||
renderResult = render(<VoiceBroadcastPlaybackBody playback={playback} />);
|
||||
});
|
||||
|
||||
it("should render as expected", () => {
|
||||
expect(renderResult.container).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue