mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-30 19:39:22 +00:00
fix: wrong usage of poll
This commit is contained in:
@@ -127,23 +127,19 @@ async function expectVideoTilesCount(page: Page, count: number): Promise<void> {
|
|||||||
// There should be `count` video elements, visible and autoplaying
|
// There should be `count` video elements, visible and autoplaying
|
||||||
await expect(page.locator("video")).toHaveCount(count);
|
await expect(page.locator("video")).toHaveCount(count);
|
||||||
|
|
||||||
await expect
|
await expect(async () => {
|
||||||
.poll(
|
const videoBlockCount = await page
|
||||||
async () => {
|
.locator("video")
|
||||||
return await page
|
.evaluateAll(
|
||||||
.locator("video")
|
(videos: Element[]) =>
|
||||||
.evaluateAll(
|
videos.filter(
|
||||||
(videos: Element[]) =>
|
(v: Element) => window.getComputedStyle(v).display === "block",
|
||||||
videos.filter(
|
).length,
|
||||||
(v: Element) => window.getComputedStyle(v).display === "block",
|
);
|
||||||
).length,
|
expect(videoBlockCount).toBe(count);
|
||||||
);
|
}).toPass({
|
||||||
},
|
timeout: 10000,
|
||||||
{
|
});
|
||||||
timeout: 10000,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.toBe(count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SpaHelpers = {
|
export const SpaHelpers = {
|
||||||
|
|||||||
Reference in New Issue
Block a user