remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/apps/remixdesktop/test/nighwatch.app.ts

78 lines
2.3 KiB

11 months ago
const os = require('os');
11 months ago
const http = require('http');
10 months ago
import axios from 'axios';
11 months ago
11 months ago
const useIsoGit = process.argv.includes('--useIsoGit');
11 months ago
const useOffline = process.argv.includes('--useOffline');
11 months ago
11 months ago
// Determine if running on CircleCI or locally with --e2e-local
const isLocalE2E = process.argv.includes('--e2e-local') && !process.env.CIRCLECI;
1 year ago
module.exports = {
src_folders: ['build-e2e/remixdesktop/test/tests/app'],
output_folder: './reports/tests',
11 months ago
custom_commands_path: ['build-e2e/remix-ide-e2e/src/commands'],
1 year ago
page_objects_path: '',
globals_path: '',
test_settings: {
default: {
11 months ago
enable_fail_fast: true,
1 year ago
selenium_port: 4444,
selenium_host: 'localhost',
globals: {
waitForConditionTimeout: 10000,
asyncHookTimeout: 100000
},
screenshots: {
enabled: true,
path: './reports/screenshots',
on_failure: true,
on_error: true
11 months ago
},
webdriver: {
start_process: true,
timeout_options: {
11 months ago
timeout: 60000,
11 months ago
retry_attempts: 3
}
},
1 year ago
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
11 months ago
'goog:chromeOptions': (() => {
const type = os.type();
const arch = os.arch();
let binaryPath = "";
// Check if running on CircleCI or locally
let args = process.env.CIRCLECI ? ["--e2e"] : ["--e2e-local"];
11 months ago
if(useIsoGit) args = [...args, '--useIsoGit'];
11 months ago
if(useOffline) args = [...args, '--useOffline'];
11 months ago
11 months ago
switch (type) {
case 'Windows_NT':
binaryPath = "./release/win-unpacked/Remix-Desktop.exe";
break;
case 'Darwin':
binaryPath = arch === 'x64' ?
"release/mac/Remix-Desktop.app/Contents/MacOS/Remix-Desktop" :
"release/mac-arm64/Remix-Desktop.app/Contents/MacOS/Remix-Desktop";
break;
case 'Linux':
binaryPath = "release/linux-unpacked/remixdesktop";
break;
}
return {
binary: binaryPath,
args: args
};
})()
11 months ago
}
11 months ago
}
1 year ago
}
11 months ago
};