mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-18 18:59:23 +00:00
fix unit tests
This commit is contained in:
@@ -39,16 +39,16 @@ describe("MediaMuteAndSwitchButton", () => {
|
|||||||
const renderVideoDisabled = renderLabels("video", false);
|
const renderVideoDisabled = renderLabels("video", false);
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
renderAudioEndabled.getByRole("button", { name: "Mute microphone" }),
|
renderAudioEndabled.getByRole("switch", { name: "Mute microphone" }),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
expect(
|
expect(
|
||||||
renderAudioDisabled.getByRole("button", { name: "Unmute microphone" }),
|
renderAudioDisabled.getByRole("switch", { name: "Unmute microphone" }),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
expect(
|
expect(
|
||||||
renderVideoEnabled.getByRole("button", { name: "Start video" }),
|
renderVideoEnabled.getByRole("switch", { name: "Start video" }),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
expect(
|
expect(
|
||||||
renderVideoDisabled.getByRole("button", { name: "Stop video" }),
|
renderVideoDisabled.getByRole("switch", { name: "Stop video" }),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ describe("MediaMuteAndSwitchButton", () => {
|
|||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
|
||||||
await user.click(getByRole("button", { name: "Mute microphone" }));
|
await user.click(getByRole("switch", { name: "Mute microphone" }));
|
||||||
|
|
||||||
expect(onMute).toHaveBeenCalled();
|
expect(onMute).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ exports[`MediaMuteAndSwitchButton > renders 1`] = `
|
|||||||
class="_button_1nw83_8 button _icon-only_1nw83_53"
|
class="_button_1nw83_8 button _icon-only_1nw83_53"
|
||||||
data-kind="primary"
|
data-kind="primary"
|
||||||
data-size="lg"
|
data-size="lg"
|
||||||
role="button"
|
role="switch"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user