mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 21:11:17 +00:00
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:
@@ -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 () => {
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user