Add playwright test for hotswatpping transport

This commit is contained in:
Timo K
2026-01-16 14:27:32 +01:00
parent 5c366320cb
commit 22c1948a82
3 changed files with 132 additions and 5 deletions

View File

@@ -37,8 +37,14 @@ modePairs.forEach(([rtcMode1, rtcMode2]) => {
await florian.page.pause();
await TestHelpers.setEmbeddedElementCallRtcMode(florian.page, rtcMode1);
await TestHelpers.setEmbeddedElementCallRtcMode(timo.page, rtcMode2);
await TestHelpers.openWidgetSetEmbeddedElementCallRtcModeCloseWidget(
florian.page,
rtcMode1,
);
await TestHelpers.openWidgetSetEmbeddedElementCallRtcModeCloseWidget(
timo.page,
rtcMode2,
);
await TestHelpers.startCallInCurrentRoom(florian.page, false);
await TestHelpers.joinCallFromLobby(florian.page);
@@ -59,7 +65,7 @@ modePairs.forEach(([rtcMode1, rtcMode2]) => {
// No one should be waiting for media
await expect(frame.getByText("Waiting for media...")).not.toBeVisible();
// There should be 5 video elements, visible and autoplaying
// There should be 2 video elements, visible and autoplaying
const videoElements = await frame.locator("video").all();
expect(videoElements.length).toBe(2);