Skip to content

Commit

Permalink
fix: try to fix macos
Browse files Browse the repository at this point in the history
  • Loading branch information
KVNLS committed Sep 21, 2023
1 parent 90de8a7 commit 37c9762
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
57 changes: 30 additions & 27 deletions apps/ledger-live-desktop/tests/fixtures/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,36 @@ const test = base.extend<TestFixtures>({

// launch app
const windowSize = { width: 1024, height: 768 };

const electronApp: ElectronApplication = await electron.launch({
args: [
`${path.join(__dirname, "../../.webpack/main.bundle.js")}`,
`--user-data-dir=${userdataDestinationPath}`,
// `--window-size=${window.width},${window.height}`, // FIXME: Doesn't work, window size can't be forced?
"--force-device-scale-factor=1",
"--disable-dev-shm-usage",
// "--use-gl=swiftshader"
"--no-sandbox",
"--enable-logging",
],
recordVideo: {
dir: `${path.join(__dirname, "../artifacts/videos/")}`,
size: windowSize, // FIXME: no default value, it could come from viewport property in conf file but it's not the case
},
env: { ...env, NODE_ENV: "development" },
colorScheme: theme,
locale: lang,
executablePath: require("electron/index.js"),
timeout: 120000,
});

await use(electronApp);

// close app
await electronApp.close();
try {
const electronApp: ElectronApplication = await electron.launch({
args: [
`${path.join(__dirname, "../../.webpack/main.bundle.js")}`,
`--user-data-dir=${userdataDestinationPath}`,
// `--window-size=${window.width},${window.height}`, // FIXME: Doesn't work, window size can't be forced?
"--force-device-scale-factor=1",
"--disable-dev-shm-usage",
// "--use-gl=swiftshader"
"--no-sandbox",
"--enable-logging",
],
recordVideo: {
dir: `${path.join(__dirname, "../artifacts/videos/")}`,
size: windowSize, // FIXME: no default value, it could come from viewport property in conf file but it's not the case
},
env: { ...env, NODE_ENV: "development" },
colorScheme: theme,
locale: lang,
executablePath: require("electron/index.js"),
timeout: 120000,
});

await use(electronApp);

// close app
await electronApp.close();
} catch (error) {
console.log(error);
}
},
page: async ({ electronApp }, use) => {
// app is ready
Expand Down
3 changes: 2 additions & 1 deletion apps/ledger-live-desktop/tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const config: PlaywrightTestConfig = {
preserveOutput: process.env.CI ? "failures-only" : "always",
maxFailures: process.env.CI ? 5 : undefined,
reportSlowTests: process.env.CI ? { max: 0, threshold: 60000 } : null,
workers: process.env.CI ? 1 : 1, // NOTE: 'macos-latest' and 'windows-latest' can't run 3 concurrent workers
fullyParallel: true,
workers: "50%", // NOTE: 'macos-latest' and 'windows-latest' can't run 3 concurrent workers
retries: process.env.CI ? 2 : 0, // FIXME: --update-snapshots doesn't work with --retries
reporter: process.env.CI
? [
Expand Down

0 comments on commit 37c9762

Please sign in to comment.