From 0a3694f90ad58ddad56fd9e0e09291911963eca9 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 13 Mar 2024 06:09:20 +0100 Subject: [PATCH] run linux --- .circleci/config.yml | 2 +- apps/remixdesktop/src/main.ts | 1 + apps/remixdesktop/src/plugins/fsPlugin.ts | 4 ++-- apps/remixdesktop/test/nighwatch.app.ts | 13 +++++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7042f2c7d..9e2046d492 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -137,7 +137,7 @@ jobs: name: "Run tests" command: | cd apps/remixdesktop/ - yarn run build:e2e && yarn run test:app:linuxlocal + yarn run build:e2e && yarn run test:app:linux build-remixdesktop-linux: machine: diff --git a/apps/remixdesktop/src/main.ts b/apps/remixdesktop/src/main.ts index 2dc4581c9c..b7ee55f60c 100644 --- a/apps/remixdesktop/src/main.ts +++ b/apps/remixdesktop/src/main.ts @@ -7,6 +7,7 @@ export const version = app.getVersion(); const args = process.argv.slice(1) export const isE2ELocal = args.find(arg => arg.startsWith('--e2e-local')) +export const isE2E = args.find(arg => arg.startsWith('--e2e')) if (isE2ELocal) { console.log('e2e mode') diff --git a/apps/remixdesktop/src/plugins/fsPlugin.ts b/apps/remixdesktop/src/plugins/fsPlugin.ts index 61fbc8cb65..110ac98624 100644 --- a/apps/remixdesktop/src/plugins/fsPlugin.ts +++ b/apps/remixdesktop/src/plugins/fsPlugin.ts @@ -3,7 +3,7 @@ import fs from 'fs/promises' import {Profile} from '@remixproject/plugin-utils' import chokidar from 'chokidar' import {dialog, shell} from 'electron' -import {createWindow, isPackaged} from '../main' +import {createWindow, isE2E, isPackaged} from '../main' import {writeConfig} from '../utils/config' import path from 'path' import {customAction} from '@remixproject/plugin-api' @@ -32,7 +32,7 @@ const getBaseName = (pathName: string): string => { export class FSPlugin extends ElectronBasePlugin { clients: FSPluginClient[] = [] constructor() { - super(profile, clientProfile, FSPluginClientE2E) + super(profile, clientProfile, isE2E? FSPluginClientE2E: FSPluginClient) this.methods = [...super.methods, 'closeWatch', 'removeCloseListener'] } diff --git a/apps/remixdesktop/test/nighwatch.app.ts b/apps/remixdesktop/test/nighwatch.app.ts index ccb2b78505..e3f96b57f7 100644 --- a/apps/remixdesktop/test/nighwatch.app.ts +++ b/apps/remixdesktop/test/nighwatch.app.ts @@ -49,6 +49,19 @@ module.exports = { } } }, + linux: { + desiredCapabilities: { + browserName: 'chrome', + javascriptEnabled: true, + acceptSslCerts: true, + 'goog:chromeOptions': { + "binary": "release/linux-unpacked/remixdesktop", + "args": [ + "--e2e", + ] + } + } + }, windows: { desiredCapabilities: { browserName: 'chrome',