Skip to content

Commit faace02

Browse files
committed
Adapt E2E tests to new structure
1 parent aa7cb1d commit faace02

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

e2e/helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type ElectronApplication
66
} from '@playwright/test'
77

8-
const main_js = join(__dirname, '../build/electron/main.js')
8+
const main_js = join(__dirname, '../build/main/main.js')
99

1010
/**
1111
* Helper function to define a test requiring Heroic to be running

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"test": "jest",
199199
"test-watch": "jest --watch --maxWorkers=25%",
200200
"test:ci": "jest --runInBand --silent",
201-
"test:e2e": "vite build && cross-env CI=e2e xvfb-maybe -- playwright test",
201+
"test:e2e": "electron-vite build && cross-env CI=e2e xvfb-maybe -- playwright test",
202202
"release:linux": "electron-vite build && electron-builder -p always --linux deb AppImage rpm pacman tar.xz snap",
203203
"release:mac": "electron-vite build && electron-builder -p always --mac --x64 --arm64",
204204
"release:win": "electron-vite build && electron-builder -p always --win portable --x64",

src/backend/constants.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ const {
8282
nileLogFile
8383
} = createNewLogFileAndClearOldOnes()
8484

85-
const publicDir = resolve(__dirname, '..', app.isPackaged ? '' : '../public')
85+
const publicDir = resolve(
86+
__dirname,
87+
'..',
88+
app.isPackaged || process.env.CI === 'e2e' ? '' : '../public'
89+
)
8690
const gogdlAuthConfig = join(app.getPath('userData'), 'gog_store', 'auth.json')
8791
const vulkanHelperBin = fixAsarPath(
8892
join(publicDir, 'bin', process.platform, 'vulkan-helper')

0 commit comments

Comments
 (0)