From 516c436d5127fb1f54f2d97e36885d99c9b859eb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 11 Apr 2025 18:21:52 +0100 Subject: [PATCH] Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- playwright/e2e/launch/launch.spec.ts | 7 ++++++- src/electron-main.ts | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/playwright/e2e/launch/launch.spec.ts b/playwright/e2e/launch/launch.spec.ts index 25c7a367..b44d19b4 100644 --- a/playwright/e2e/launch/launch.spec.ts +++ b/playwright/e2e/launch/launch.spec.ts @@ -51,7 +51,10 @@ test.describe("App launch", () => { }); test.describe("safeStorage", () => { - test.skip(platform() === "linux", "The linux runner has no compatible wallet/keychain"); + test.use({ + extraArgs: ['--password-store="basic"'], + }); + test.skip(platform() === "darwin", "The macOS runner's keychain is not available"); const userId = "@user:server"; @@ -67,6 +70,8 @@ test.describe("App launch", () => { }); test.describe("migrate from keytar", () => { + test.skip(platform() === "win32", "Windows requires authentication to write to the store"); + const pickleKey = "DEADBEEF1234"; test.beforeEach(async () => { diff --git a/src/electron-main.ts b/src/electron-main.ts index 262e19c2..dcc017b5 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -355,6 +355,22 @@ app.enableSandbox(); // We disable media controls here. We do this because calls use audio and video elements and they sometimes capture the media keys. See https://github.com/vector-im/element-web/issues/15704 app.commandLine.appendSwitch("disable-features", "HardwareMediaKeyHandling,MediaSessionService"); +const SUPPORTED_ELECTRON_SWITCHES: string[] = []; + +if (process.platform === "linux") { + SUPPORTED_ELECTRON_SWITCHES.push("password-store"); +} +for (const switchKey of SUPPORTED_ELECTRON_SWITCHES) { + if (switchKey in argv) { + const switchValue = argv[switchKey]; + if (switchValue === true) { + app.commandLine.appendSwitch(switchKey); + } else { + app.commandLine.appendSwitch(switchKey, switchValue); + } + } +} + // Disable hardware acceleration if the setting has been set. if (global.store.get("disableHardwareAcceleration") === true) { console.log("Disabling hardware acceleration.");