-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
playwright v1.28 breaks electron tests #2969
Comments
That would be a fix for 1.28: diff --git a/package.json b/package.json
index b805bb9f..6f3038c9 100644
--- a/package.json
+++ b/package.json
@@ -59,7 +59,7 @@
"jsdom": "^20.0.0",
"lodash": "^4.17.21",
"nyc": "^15.1.0",
- "playwright": "^1.26.1",
+ "playwright": "^1.28.1",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3",
"sinon": "^14.0.0",
diff --git a/tests/electron/env_spec.js b/tests/electron/env_spec.js
index f962949c..2523e6f4 100644
--- a/tests/electron/env_spec.js
+++ b/tests/electron/env_spec.js
@@ -1,5 +1,6 @@
// see https://playwright.dev/docs/api/class-electronapplication
+const events = require("events");
const { _electron: electron } = require("playwright");
let electronApp = null;
@@ -16,6 +17,7 @@ describe("Electron app environment", function () {
});
it("should open browserwindow", async function () {
+ await electronApp.firstWindow();
expect(await electronApp.windows().length).toBe(1);
const page = await electronApp.firstWindow();
expect(await page.title()).toBe("MagicMirror²");
@@ -36,6 +38,7 @@ describe("Development console tests", function () {
});
it("should open browserwindow and dev console", async function () {
+ while (electronApp.windows().length < 2) await events.once(electronApp, "window");
const pageArray = await electronApp.windows();
expect(pageArray.length).toBe(2);
for (const page of pageArray) {
|
Thank you @mxschmitt for your hints but it still doesn't work.
So the problem seems to be that no electron window event is created. Same code works if I downgrade to playwright v1.27.1. |
rejas
pushed a commit
that referenced
this issue
Dec 8, 2022
this will be (hopefully) fixed with next playwright version v1.30 (see microsoft/playwright#19412) |
We'll cherry-pick it to 1.29.1 |
Fixed |
Merged
MichMich
added a commit
that referenced
this issue
Jan 1, 2023
## [2.22.0] - 2023-01-01 Thanks to: @angeldeejay, @buxxi, @dariom, @dWoolridge, @KristjanESPERANTO, @MagMar94, @naveensrinivasan, @retroflex, @SkySails and @tom. Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not all) of the work on this release as project collaborators. This version would not be there without their effort. Thank you! ### Added - Added test for remoteFile option in compliments module - Added hourlyWeather functionality to Weather.gov weather provider - Removed weatherEndpoint definition from weathergov.js (not used) - Added css class names "today" and "tomorrow" for default calendar - Added Collaboration.md - Added new github action for dependency review (#2862) - Added a WeatherProvider for Open-Meteo - Added Yr as a weather provider - Added config options "ignoreXOriginHeader" and "ignoreContentSecurityPolicy" ### Removed - Removed usage of internal fetch function of node until it is more stable ### Updated - Cleaned up test directory (#2937) and jest config (#2959) - Wait for all modules to start before declaring the system ready (#2487) - Updated e2e tests (moved `done()` in helper functions) and use es6 syntax in all tests - Updated da translation - Rework weather module - Make sure smhi provider api only gets a maximum of 6 digits coordinates (#2955) - Use fetch instead of XMLHttpRequest in weatherprovider (#2935) - Reworked how weatherproviders handle units (#2849) - Use unix() method for parsing times, fix suntimes on the way (#2950) - Refactor conversion functions into utils class (#2958) - The `cors`-method in `server.js` now supports sending and recieving HTTP headers - Replace `…` by `…` - Cleanup compliments module - Updated dependencies including electron to v22 (#2903) ### Fixed - Correctly show apparent temperature in SMHI weather provider - Ensure updatenotification module isn't shown when local is _ahead_ of remote - Handle node_helper errors during startup (#2944) - Possibility to change FontAwesome class in calendar, so icons like `fab fa-facebook-square` works. - Fix cors problems with newsfeed articles (as far as possible), allow disabling cors per feed with option `useCorsProxy: false` (#2840) - Tests not waiting for the application to start and stop before starting the next test - Fix electron tests failing sometimes in github workflow - Fixed gap in clock module when displayed on the left side with displayType=digital - Fixed playwright issue by upgrading to v1.29.1 (#2969) Signed-off-by: naveen <[email protected]> Co-authored-by: Karsten Hassel <[email protected]> Co-authored-by: Malte Hallström <[email protected]> Co-authored-by: Veeck <[email protected]> Co-authored-by: veeck <[email protected]> Co-authored-by: dWoolridge <[email protected]> Co-authored-by: Johan <[email protected]> Co-authored-by: Dario Mratovich <[email protected]> Co-authored-by: Dario Mratovich <[email protected]> Co-authored-by: Magnus <[email protected]> Co-authored-by: Naveen <[email protected]> Co-authored-by: buxxi <[email protected]> Co-authored-by: Thomas Hirschberger <[email protected]> Co-authored-by: Kristjan ESPERANTO <[email protected]> Co-authored-by: Andrés Vanegas Jiménez <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
so we should not update at the moment.
The text was updated successfully, but these errors were encountered: