diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a38b106e794156fc8f7d03dc785482d3d9126e62..0637083db90855c0a103abca579fc39a74881727 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -233,12 +233,12 @@ ivette-tests: - make clean && make && make -C ivette dist - cd ivette - cp dist/renderer/* dist/main/ - - xvfb-run --auto-servernum -e /dev/stdout -s "-screen 0 1280x1024x24 -ac -nolisten tcp -nolisten unix" npx playwright test --headed + - xvfb-run --auto-servernum -e /dev/stdout -s "-screen 0 1920x1080x24 -ac -nolisten tcp -nolisten unix" yarn playwright test --headed artifacts: paths: - ivette/test-results - ivette/screenshots - when: on_failure + when: always expire_in: 1 day tags: - docker diff --git a/ivette/src/dome/main/dome.ts b/ivette/src/dome/main/dome.ts index e375ee8eb97f37c5169dceaeb9c97976e89f92ab..8666c36392807361687a97b2a5ab35f1e432a82e 100644 --- a/ivette/src/dome/main/dome.ts +++ b/ivette/src/dome/main/dome.ts @@ -408,8 +408,8 @@ function createBrowserWindow( let configFile = PATH_WINDOW_SETTINGS; if (argv && argv.includes('--with-fixed-settings')) { configFile = - argv[process.argv.indexOf('--with-fixed-settings') + 1]; - argv = process.argv.filter((p) => !!p && p !== "--with-fixed-settings"); + argv[argv.indexOf('--with-fixed-settings') + 1]; + argv = argv.filter((p) => !!p && p !== "--with-fixed-settings" && p !== configFile); } else if (isAppWindow) { configFile = lookupConfig(wdir); } diff --git a/ivette/tests/e2e-playwright/libs/e2eService.ts b/ivette/tests/e2e-playwright/libs/e2eService.ts index da2b61101a8f64b66b5efaf26cd1e8746fa4e0c2..9d1a1fa02a70954fb4448cb2d176b03ad52759de 100644 --- a/ivette/tests/e2e-playwright/libs/e2eService.ts +++ b/ivette/tests/e2e-playwright/libs/e2eService.ts @@ -46,7 +46,8 @@ export const argsLaunchWithDefaultSettings: string[] = [ // e2e tests using an additional C file loaded export const argsLaunchWithTestFile: string[] = [ "./dist/main/main.js", - "--no-sandbox", + "--with-fixed-settings", + "./tests/settings.json", "--command", "../bin/frama-c", "../tests/test/adpcm.c", diff --git a/ivette/tests/e2e-playwright/monkey/monkey-testing.spec.ts b/ivette/tests/e2e-playwright/monkey/monkey-testing.spec.ts index 290e47c36b74c5be1a128188ce8dfe1cd891f29f..a4694902ac8beefab7e70b3574b6108c36313b14 100644 --- a/ivette/tests/e2e-playwright/monkey/monkey-testing.spec.ts +++ b/ivette/tests/e2e-playwright/monkey/monkey-testing.spec.ts @@ -26,9 +26,9 @@ import * as e2eService from "../libs/e2eService"; /* eslint-disable @typescript-eslint/no-explicit-any */ let gremlins: any; -test.skip("run gremlins.js", async () => { +test("run gremlins.js", async () => { const launchAppResult = await e2eService.launchApp( - e2eService.argsLaunchWithDefaultSettings, + e2eService.argsDefaultLaunch, ); const electronApp = launchAppResult.app; const window = launchAppResult.page; diff --git a/ivette/tests/e2e-playwright/server-connection.spec.ts b/ivette/tests/e2e-playwright/server-connection.spec.ts index d82b970264f1a9cab0422f45329a7aef36b685cd..79a8f3e33d0673b0a80742eb6d9682baecb339c9 100644 --- a/ivette/tests/e2e-playwright/server-connection.spec.ts +++ b/ivette/tests/e2e-playwright/server-connection.spec.ts @@ -25,7 +25,7 @@ import * as e2eService from "./libs/e2eService"; test("check server connection", async () => { const launchAppResult = await e2eService.launchApp( - e2eService.argsDefaultLaunch, + e2eService.argsLaunchWithDefaultSettings, ); const electronApp = launchAppResult.app; const window = launchAppResult.page; diff --git a/ivette/tests/settings.json b/ivette/tests/settings.json index 948b07975357676aedcd066c5b8ae1570c1fdbe2..f8dfd8088916ed663e541ca8b79954ea6b999c6b 100644 --- a/ivette/tests/settings.json +++ b/ivette/tests/settings.json @@ -2,8 +2,8 @@ "frame": { "x": 100, "y": 100, - "width": 1000, - "height": 750 + "width": 1900, + "height": 1060 }, "settings": { "frama-c.labview.shape": {