From 2d33b420aa4a1cd5345c8537806d35f6180a57e5 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Tue, 23 Apr 2024 09:40:55 +0100 Subject: [PATCH] update test fixture configuration and file structure --- package-lock.json | 2 +- package.json | 2 +- test/electron/fixtures/app/forge.config.js | 18 +++++++++++------- .../electron/fixtures/app/{src => }/index.html | 2 +- test/electron/fixtures/app/main.js | 2 +- .../fixtures/app/webpack.main.config.js | 7 +------ .../fixtures/app/webpack.renderer.config.js | 6 +----- 7 files changed, 17 insertions(+), 22 deletions(-) rename test/electron/fixtures/app/{src => }/index.html (99%) diff --git a/package-lock.json b/package-lock.json index 6bd7ea4ed0..5cf3c20b2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,7 +66,7 @@ "metro-react-native-babel-preset": "^0.58.0", "ncp": "^2.0.0", "node-fetch": "^2.6.0", - "playwright": "^1.43.1", + "playwright": "^1.10.0", "proxyquire": "^2.1.3", "ps-list": "^7.2.0", "react": "^16.13.1", diff --git a/package.json b/package.json index 9b7cc7be55..43c9c95e8b 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "metro-react-native-babel-preset": "^0.58.0", "ncp": "^2.0.0", "node-fetch": "^2.6.0", - "playwright": "^1.43.1", + "playwright": "^1.10.0", "proxyquire": "^2.1.3", "ps-list": "^7.2.0", "react": "^16.13.1", diff --git a/test/electron/fixtures/app/forge.config.js b/test/electron/fixtures/app/forge.config.js index 6a909151db..c55f4377ce 100644 --- a/test/electron/fixtures/app/forge.config.js +++ b/test/electron/fixtures/app/forge.config.js @@ -5,23 +5,27 @@ module.exports = { packagerConfig: { asar: true }, - rebuildConfig: {}, makers: [ { name: '@electron-forge/maker-squirrel', - config: {} - }, - { - name: '@electron-forge/maker-zip', - platforms: ['darwin'] + config: { + name: 'Runner' + } }, { name: '@electron-forge/maker-deb', config: {} }, + { + name: '@electron-forge/maker-dmg' + }, { name: '@electron-forge/maker-rpm', config: {} + }, + { + name: '@electron-forge/maker-zip', + platforms: ['darwin'] } ], plugins: [ @@ -37,7 +41,7 @@ module.exports = { config: './webpack.renderer.config.js', entryPoints: [ { - html: './src/index.html', + html: './index.html', js: './renderer.js', name: 'main_window' } diff --git a/test/electron/fixtures/app/src/index.html b/test/electron/fixtures/app/index.html similarity index 99% rename from test/electron/fixtures/app/src/index.html rename to test/electron/fixtures/app/index.html index 4504787609..9f649c574e 100644 --- a/test/electron/fixtures/app/src/index.html +++ b/test/electron/fixtures/app/index.html @@ -2,7 +2,7 @@ - Electron Test Runner + Runner diff --git a/test/electron/fixtures/app/main.js b/test/electron/fixtures/app/main.js index fc53d5218f..4970c1b78c 100644 --- a/test/electron/fixtures/app/main.js +++ b/test/electron/fixtures/app/main.js @@ -4,7 +4,7 @@ const { unhandledRejection, crash, notify -} = require('./src/errors.js') +} = require('./src/errors') const configFile = process.env.BUGSNAG_CONFIG || 'default' // eslint-disable-next-line no-undef const bugsnagConfig = __non_webpack_require__(`./${configFile}`) diff --git a/test/electron/fixtures/app/webpack.main.config.js b/test/electron/fixtures/app/webpack.main.config.js index a638dcbf1a..79b1fc84ed 100644 --- a/test/electron/fixtures/app/webpack.main.config.js +++ b/test/electron/fixtures/app/webpack.main.config.js @@ -7,13 +7,8 @@ readdirSync('./configs').forEach(name => { }) module.exports = { - /** - * This is the main entry point for your application, it's the first file - * that runs in the main process. - */ - entry: entrypoints, - // Put your normal webpack config below here devtool: 'hidden-source-map', + entry: entrypoints, output: { filename: '[name].js' }, diff --git a/test/electron/fixtures/app/webpack.renderer.config.js b/test/electron/fixtures/app/webpack.renderer.config.js index 71f62ba026..06512d4040 100644 --- a/test/electron/fixtures/app/webpack.renderer.config.js +++ b/test/electron/fixtures/app/webpack.renderer.config.js @@ -7,7 +7,6 @@ readdirSync('./preloads').forEach(name => { }) module.exports = { - // Put your normal webpack config below here devtool: 'hidden-source-map', entry: entrypoints, output: { @@ -21,8 +20,5 @@ module.exports = { }, plugins: [ new webpack.ProgressPlugin() - ], - module: { - rules: require('./webpack.rules') - } + ] }