Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions playwright/spa-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ async function createCall(
await setRtcModeFromSettings(page, mode);
}

await switchNoiseSuppressionFromSettings(page);

if (autoJoin) {
// Join the call
await page.getByTestId("lobby_joinCall").click();
Expand Down Expand Up @@ -87,6 +89,8 @@ async function joinCallFromInviteLink(
await setRtcModeFromSettings(page, mode);
}

await switchNoiseSuppressionFromSettings(page);

await page.getByTestId("lobby_joinCall").click();
await page.getByRole("radio", { name: "Spotlight" }).check();
}
Expand All @@ -113,6 +117,21 @@ async function setRtcModeFromSettings(
await page.getByTestId("modal_close").click();
}

async function switchNoiseSuppressionFromSettings(page: Page): Promise<void> {
await page.getByRole("button", { name: "Settings" }).click();
await page.getByRole("tab", { name: "Audio" }).click();
await page.getByText("Noise suppression", { exact: true }).uncheck();

// wait for short time before checking the box again
await page.waitForTimeout(1000);
await page.getByText("Noise suppression", { exact: true }).check();

// wait again for a short time
await page.waitForTimeout(1000);

await page.getByTestId("modal_close").click();
}

/**
* Expect a certain number of video tiles to be present and visible.
*/
Expand Down