Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
matrix:
os:
- macos-latest
# Testing on Linux is temporarily disabled until we can figure out the SUID sandboxing issue.
# - ubuntu-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
Expand Down
54 changes: 53 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./out/main/main.js",
"scripts": {
"start": "electron-vite preview",
"test": "electron-vite build && playwright test"
"test": "electron-vite build && xvfb-maybe playwright test"
},
"author": "Drupal Association",
"license": "MIT",
Expand All @@ -16,7 +16,8 @@
"electron-builder": "^26.0.16",
"electron-vite": "^3.1.0",
"typescript": "^5.8.3",
"vite": "^6.3.5"
"vite": "^6.3.5",
"xvfb-maybe": "^0.2.1"
},
"dependencies": {
"@sentry/electron": "^6.7.0",
Expand Down
3 changes: 3 additions & 0 deletions tests/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,22 @@ test.afterEach(async ({}, testInfo) => {
});

test('happy path', async ({}, testInfo) => {
console.log(process.env);
const electronApp = await electron.launch({
args: [
'.',
`--root=${testInfo.outputPath('drupal')}`,
'--fixture=basic',
`--log=${testInfo.outputPath('install.log')}`,
'--no-sandbox',
],
env: {
// The fixture is located in a path repository, so we want to ensure Composer
// makes a full copy of it.
COMPOSER_MIRROR_PATH_REPOS: '1',
// Disable the network so we don't inadvertently test the internet.
COMPOSER_DISABLE_NETWORK: '1',
DISPLAY: process.env.DISPLAY,
},
});

Expand Down
Loading