Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
wait until widget loading is over before comparing screenshots
Browse files Browse the repository at this point in the history
Signed-off-by: Timo K <toger5@hotmail.de>
  • Loading branch information
toger5 committed Feb 29, 2024
1 parent f7b0035 commit df821ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions playwright/e2e/widgets/layout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const WIDGET_HTML = `
<head>
<title>Fake Widget</title>
</head>
<body>
<body class="widget_body_class">
Hello World
</body>
</html>
Expand All @@ -38,7 +38,7 @@ test.describe("Widget Layout", () => {

let roomId: string;
let widgetUrl: string;
test.beforeEach(async ({ webserver, app, user }) => {
test.beforeEach(async ({ webserver, app, user, page }) => {
widgetUrl = webserver.start(WIDGET_HTML);

roomId = await app.client.createRoom({ name: ROOM_NAME });
Expand Down Expand Up @@ -76,6 +76,7 @@ test.describe("Widget Layout", () => {

// open the room
await app.viewRoomByName(ROOM_NAME);
await page.waitForSelector(".widget_body_class");
});

test("should be set properly", async ({ page }) => {
Expand Down

0 comments on commit df821ca

Please sign in to comment.