mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-08 20:09:19 +00:00
review: quick cleaning
This commit is contained in:
@@ -124,7 +124,7 @@ async function expectVideoTilesCount(page: Page, count: number): Promise<void> {
|
|||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
});
|
});
|
||||||
|
|
||||||
// There should be 5 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
|
||||||
|
|||||||
@@ -78,10 +78,13 @@ widgetTest("Create and join a group call", async ({ addUser, browserName }) => {
|
|||||||
await expect(frame.getByTestId("videoTile")).toHaveCount(5, {
|
await expect(frame.getByTestId("videoTile")).toHaveCount(5, {
|
||||||
timeout: 15000,
|
timeout: 15000,
|
||||||
});
|
});
|
||||||
for (const participant of [valere, timo, robin, halfshot, florian]) {
|
|
||||||
// Check the names are correct
|
await Promise.all([
|
||||||
await expect(frame.getByText(participant.displayName)).toBeVisible();
|
[valere, timo, robin, halfshot, florian].map(async (user) => {
|
||||||
}
|
// Check the names are correct
|
||||||
|
expect(frame.getByText(participant.displayName)).toBeVisible();
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
|
||||||
// No one should be waiting for media
|
// No one should be waiting for media
|
||||||
await expect(frame.getByText("Waiting for media...")).not.toBeVisible({
|
await expect(frame.getByText("Waiting for media...")).not.toBeVisible({
|
||||||
@@ -121,9 +124,6 @@ widgetTest("Create and join a group call", async ({ addUser, browserName }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// out of 5 ONLY 4 are visible (display:block) !!
|
// out of 5 ONLY 4 are visible (display:block) !!
|
||||||
// XXX we need to be better at our HTML markup and accessibility, it would make
|
|
||||||
// this kind of stuff way easier to test if we could look out for aria attributes.
|
|
||||||
// ✅ Retryable assertion for visible videos
|
|
||||||
await TestHelpers.expectVisibleVideoCount(frame, 4);
|
await TestHelpers.expectVisibleVideoCount(frame, 4);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -365,7 +365,8 @@ export class TestHelpers {
|
|||||||
frame: FrameLocator,
|
frame: FrameLocator,
|
||||||
count: number,
|
count: number,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
// ✅ Retryable assertion for visible videos
|
// XXX we need to be better at our HTML markup and accessibility, it would make
|
||||||
|
// this kind of stuff way easier to test if we could look out for aria attributes.
|
||||||
await expect
|
await expect
|
||||||
.poll(
|
.poll(
|
||||||
async () => {
|
async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user