electron tests: fixes for running under new github image ubuntu-24.04 (#3680)

and replace xserver with labwc, fixes #3676
This commit is contained in:
Karsten Hassel
2025-01-05 11:07:34 +01:00
committed by GitHub
parent 0f6efac8e6
commit 8fdd865cb1
4 changed files with 16 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ describe("Electron app environment", () => {
describe("Development console tests", () => {
beforeEach(async () => {
await helpers.startApplication("tests/configs/modules/display.js", null, ["js/electron.js", "dev"]);
await helpers.startApplication("tests/configs/modules/display.js", null, ["dev"]);
});
afterEach(async () => {

View File

@@ -3,7 +3,7 @@
// https://www.anycodings.com/1questions/958135/can-i-set-the-date-for-playwright-browser
const { _electron: electron } = require("playwright");
exports.startApplication = async (configFilename, systemDate = null, electronParams = ["js/electron.js"], timezone = "GMT") => {
exports.startApplication = async (configFilename, systemDate = null, electronParams = [], timezone = "GMT") => {
global.electronApp = null;
global.page = null;
process.env.MM_CONFIG_FILE = configFilename;
@@ -13,6 +13,8 @@ exports.startApplication = async (configFilename, systemDate = null, electronPar
}
process.env.mmTestMode = "true";
electronParams.unshift("js/electron.js", "--enable-features=UseOzonePlatform", "--ozone-platform=wayland");
global.electronApp = await electron.launch({ args: electronParams });
await global.electronApp.firstWindow();