Tag the video element with its track source for e2e specs

The SDK MediaView renders a plain video element, so LiveKit's
data-lk-source attribute is gone. Expose data-source from the SDK track
and point the screen-share spec at it.
This commit is contained in:
Timo K.
2026-10-14 10:23:29 +02:00
committed by Timo
parent 3f98e36c56
commit d37599a794
3 changed files with 22 additions and 6 deletions
+6 -6
View File
@@ -76,9 +76,9 @@ widgetTest("Sharing screen in group call", async ({ addUser, browserName }) => {
timeout: 5000,
});
await expect(
frame.locator('video[data-lk-source="screen_share"]'),
).toHaveCount(1);
await expect(frame.locator('video[data-source="screenShare"]')).toHaveCount(
1,
);
}
// Alice should be in grid mode as she is local sharing
@@ -117,9 +117,9 @@ widgetTest("Sharing screen in group call", async ({ addUser, browserName }) => {
timeout: 5000,
});
await expect(
frame.locator('video[data-lk-source="screen_share"]'),
).toHaveCount(2);
await expect(frame.locator('video[data-source="screenShare"]')).toHaveCount(
2,
);
// Expect 2 indicators at the bottom
await expect(frame.getByTestId("screenshare-indicator")).toHaveCount(2);