use better test condition for mute buttons
This commit is contained in:
@@ -47,34 +47,22 @@ widgetTest("Footer interaction in PiP", async ({ addUser, browserName }) => {
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Check for a bug where the video had the wrong fit in PIP
|
// Check for a bug where the video had the wrong fit in PIP
|
||||||
const hangupButton = iFrame.getByRole("button", { name: "End call" });
|
const hangupBtn = iFrame.getByRole("button", { name: "End call" });
|
||||||
const audioMuteButton = iFrame.getByTestId("incall_mute");
|
const audioBtn = iFrame.getByTestId("incall_mute");
|
||||||
const videoMuteButton = iFrame.getByTestId("incall_videomute");
|
const videoBtn = iFrame.getByTestId("incall_videomute");
|
||||||
await expect(hangupButton).toBeVisible();
|
await expect(hangupBtn).toBeVisible();
|
||||||
await expect(audioMuteButton).toBeVisible();
|
await expect(audioBtn).toBeVisible();
|
||||||
await expect(videoMuteButton).toBeVisible();
|
await expect(videoBtn).toBeVisible();
|
||||||
await expect(audioMuteButton).toHaveCSS(
|
await expect(audioBtn).toHaveAttribute("aria-label", /^Mute microphone$/);
|
||||||
"background-color",
|
await expect(videoBtn).toHaveAttribute("aria-label", /^Stop video$/);
|
||||||
"rgb(255, 255, 255)",
|
|
||||||
);
|
await videoBtn.click();
|
||||||
await expect(videoMuteButton).toHaveCSS(
|
await audioBtn.click();
|
||||||
"background-color",
|
|
||||||
"rgb(255, 255, 255)",
|
|
||||||
);
|
|
||||||
await videoMuteButton.click();
|
|
||||||
await audioMuteButton.click();
|
|
||||||
// stop hovering on any of the buttons
|
// stop hovering on any of the buttons
|
||||||
await iFrame.getByTestId("videoTile").hover();
|
await iFrame.getByTestId("videoTile").hover();
|
||||||
await valere.page.pause();
|
|
||||||
|
|
||||||
await expect(audioMuteButton).toHaveCSS(
|
await expect(audioBtn).toHaveAttribute("aria-label", /^Unmute microphone$/);
|
||||||
"background-color",
|
await expect(videoBtn).toHaveAttribute("aria-label", /^Start video$/);
|
||||||
"rgb(27, 29, 34)",
|
|
||||||
);
|
|
||||||
|
|
||||||
await expect(videoMuteButton).toHaveCSS(
|
|
||||||
"background-color",
|
|
||||||
"rgb(27, 29, 34)",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user