Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of concept: playwright e2e tests #3001

Merged
merged 9 commits into from
Jan 17, 2024
Prev Previous commit
Next Next commit
align spaces
  • Loading branch information
SteffenDE committed Jan 15, 2024
commit 1ff348907d2c1ea229119df298b97ff8f859a0dc
14 changes: 7 additions & 7 deletions test/e2e/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ const { expect } = require("@playwright/test");

// a helper function to wait until the LV has no pending events
const syncLV = async (page) => {
const promises = [
expect(page.locator(".phx-connected").first()).toBeVisible(),
expect(page.locator(".phx-change-loading")).toHaveCount(0),
expect(page.locator(".phx-click-loading")).toHaveCount(0),
expect(page.locator(".phx-submit-loading")).toHaveCount(0),
];
return Promise.all(promises);
const promises = [
expect(page.locator(".phx-connected").first()).toBeVisible(),
expect(page.locator(".phx-change-loading")).toHaveCount(0),
expect(page.locator(".phx-click-loading")).toHaveCount(0),
expect(page.locator(".phx-submit-loading")).toHaveCount(0),
];
return Promise.all(promises);
};

module.exports = { syncLV };