Fix bad path name for user data dir, upgrade node-abi (#3406)

* Fix bad path name for user data dir, upgrade node-abi

* Run windows e2e

* Enable Windows tests and fix linux e2e crash

* chore: remove redundant dependencies and environment variables in e2e workflow

* fix: resolve Linux GPU process initialization errors in GitHub Actions

* Fix linux tests

* Fix lint

* fix: Enhance GPU handling to prevent process crashes in E2E tests

This commit addresses GPU-related stability issues in our E2E test environment by:

1. Updating GPU helper utility with more comprehensive disabling methods
2. Adding environment variables to force software rendering
3. Configuring Electron to use in-process GPU rendering
4. Adding additional Linux dependencies for better GPU support
5. Expanding command-line flags to mitigate GPU process crashes

The changes include modifications to:
- e2e/utils/gpu-helper.js
- e2e/modules/environment.js
- .github/workflows/e2e-functional-template.yml
- .github/actions/install-os-dependencies/action.yaml

* Fix linux tests

* Fix linux tests

* Fix linux tests

* Fix linux tests

* Fix linux tests

* Revert "chore: remove redundant dependencies and environment variables in e2e workflow"

This reverts commit 6a8eb0cbee155c3fd3f26df8d45af8c1f5cf2f12.

* run tests with xvfb-run --auto-servernum

* change ubuntu-runner to use latest

* change ubuntu-runner to use 24.04 version

* fix linux tests

* fix linux tests

* add preload test script

* add preload test script

* add preload test script

* update preload script

* reset all changes made to fix linux e2e error

* reset all changes made to fix linux e2e error

* reset all changes made to fix linux e2e error

* fix linux package instalation

* fix chrome sandbox permission issue

* bump electron version to 36.1.0

* Revert "bump electron version to 36.1.0"

This reverts commit 4a9bf858754c0c1909b3626f703578913adf3714.

* install dbus and declare DBUS_SYSTEM_BUS_ADDRESS

* fix dbus error

* fix dbus error

* fix dbus error

* fix dbus error

* fix: Try the community suggestion

-  https://github.com/actions/runner-images/issues/12127#issuecomment-2854346891

* change libasound2 to libasound2t64

* use gcc-12-aarch64-linux-gnu instead of gcc-aarch64-linux-gnu

* remove multilib

* fix xvfb crash

* fix: add PW_CHROMIUM_ARGS

* fix: add --disable-gpu-sandbox to the e2e run command

* fix: windows job

* pass version to electron rebuild

* fix post install script under /e2e

* Revert "fix post install script under /e2e"

This reverts commit 01efeed2e5038684c0aea5bb0be837b7041be8ca.

* skip postinstall scipt for windows job

* hardcode electron version in the e2e/package.json

* update script

* Revert "update script"

This reverts commit 078d197e44dc78972876a977f4a91182d89024b6.

* update script

* reset

* upgrade electron/rebuild package

* Revert "upgrade electron/rebuild package"

This reverts commit 25b144df05152b0bc112db6473263bfd68850874.

* Patch electron/rebuild

* Fix macOS test

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Devin Binnie
2025-06-19 10:39:16 -04:00
committed by GitHub
parent aea19d3769
commit dcbb8b7a91
8 changed files with 169 additions and 156 deletions

View File

@@ -13,25 +13,50 @@ runs:
if: inputs.os == 'Linux'
shell: bash
run: |
# Add Wine repository key
wget -qO - https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_22.04/Release.key | sudo apt-key add -
# Install yq binary
wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.20.1/yq_linux_amd64 && chmod a+x /usr/local/bin/yq
# Update package lists
sudo apt-get update || true
# Install required packages
sudo apt-get install -y \
ca-certificates \
build-essential \
clang \
libdbus-1-dev \
libgtk-3-dev \
libnotify-dev \
libasound2-dev \
libcap-dev \
libcups2-dev \
libxtst-dev \
libxss1 \
libnss3-dev \
curl \
gperf \
bison \
python3-dbusmock \
openjdk-8-jre \
ca-certificates \
libpng++-dev \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
gcc-12-aarch64-linux-gnu \
g++-12-aarch64-linux-gnu \
jq \
icnsutils \
graphicsmagick \
tzdata \
xsel \
xvfb \
x11-utils \
libgtk-3-0 \
libnss3 \
libxss1 \
libasound2
libasound2t64 \
dbus \
dbus-x11 \
libxtst6
- name: Install macOS Dependencies
if: inputs.os == 'macOS'

View File

@@ -138,6 +138,7 @@ env:
NODE_VERSION: 18
SERVER_VERSION: ${{ inputs.MM_SERVER_VERSION || '9.9.1' }}
DESKTOP_VERSION: ${{ inputs.DESKTOP_VERSION }}
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
jobs:
e2e:
@@ -251,11 +252,13 @@ jobs:
- name: e2e/run-playright-tests-linux
if: runner.os == 'Linux'
run: |
export DISPLAY=:99
Xvfb $DISPLAY -screen 0 1280x960x24 > /dev/null 2>&1 &
eval "$(dbus-launch --sh-syntax)"
export NO_AT_BRIDGE=1
npm run build-test
cd e2e
xvfb-run -a npm run run:e2e || true
export PW_CHROMIUM_ARGS="--disable-gpu --no-sandbox --disable-dev-shm-usage"
xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24' npm run run:e2e || true
npm run send-report
env:
SERVER_VERSION: ${{ inputs.MM_SERVER_VERSION }}

View File

@@ -47,24 +47,23 @@ jobs:
description: E2E tests for Mattermost desktop app on macOS have started...
status: pending
# TODO: uncomment when https://mattermost.atlassian.net/browse/MM-63397 is fixed
# update-initial-status-windows:
# runs-on: ubuntu-22.04
# if: contains(github.event.label.name, 'Run Desktop E2E Tests')
# steps:
# - uses: mattermost/actions/delivery/update-commit-status@main
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# repository_full_name: ${{ github.repository }}
# commit_sha: ${{ github.event.pull_request.head.sha }}
# context: e2e/windows
# description: E2E tests for Mattermost desktop app on Windows have started...
# status: pending
update-initial-status-windows:
runs-on: ubuntu-22.04
if: contains(github.event.label.name, 'Run Desktop E2E Tests')
steps:
- uses: mattermost/actions/delivery/update-commit-status@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ github.event.pull_request.head.sha }}
context: e2e/windows
description: E2E tests for Mattermost desktop app on Windows have started...
status: pending
determine-platforms:
if: contains(github.event.label.name, 'Run Desktop E2E Tests')
needs: [update-initial-status-linux, update-initial-status-macos] #, update-initial-status-windows]
needs: [update-initial-status-linux, update-initial-status-macos, update-initial-status-windows]
runs-on: ubuntu-latest
outputs:
platforms: ${{ steps.set-matrix.outputs.platforms }}
@@ -73,17 +72,16 @@ jobs:
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
if [[ "${{ inputs.platform }}" == "all" ]]; then
echo "platforms=['ubuntu-22.04', 'macos-13', 'windows-2022']" >> $GITHUB_OUTPUT
echo "platforms=['ubuntu-24.04', 'macos-13', 'windows-2022']" >> $GITHUB_OUTPUT
else
case "${{ inputs.platform }}" in
linux) echo "platforms=['ubuntu-22.04']" ;;
linux) echo "platforms=['ubuntu-24.04']" ;;
macos) echo "platforms=['macos-13']" ;;
# windows) echo "platforms=['windows-2022']" ;; TODO: uncomment when https://mattermost.atlassian.net/browse/MM-63397 is fixed
windows) echo "platforms=['windows-2022']"
esac >> $GITHUB_OUTPUT
fi
elif [[ "${{ github.event_name }}" == "push" ]] || [[ "${{ contains(github.event.pull_request.labels.*.name, 'Run Desktop E2E Tests') }}" == "true" ]]; then
echo "platforms=['ubuntu-22.04', 'macos-13']" >> $GITHUB_OUTPUT
# echo "platforms=['ubuntu-22.04', 'macos-13', 'windows-2022']" >> $GITHUB_OUTPUT
echo "platforms=['ubuntu-24.04', 'macos-13', 'windows-2022']" >> $GITHUB_OUTPUT
else
echo "platforms=[]" >> $GITHUB_OUTPUT
fi
@@ -132,22 +130,21 @@ jobs:
status: ${{ needs.e2e-tests.outputs.STATUS_MACOS }}
target_url: ${{ needs.e2e-tests.outputs.REPORT_LINK_MACOS }}
# TODO: uncomment when https://mattermost.atlassian.net/browse/MM-63397 is fixed
# update-final-status-windows:
# runs-on: ubuntu-22.04
# needs:
# - e2e-tests
# steps:
# - uses: mattermost/actions/delivery/update-commit-status@main
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# repository_full_name: ${{ github.repository }}
# commit_sha: ${{ github.event.pull_request.head.sha }}
# context: e2e/windows
# description: Completed with ${{ needs.e2e-tests.outputs.NEW_FAILURES_WINDOWS }} failures
# status: ${{ needs.e2e-tests.outputs.STATUS_WINDOWS }}
# target_url: ${{ needs.e2e-tests.outputs.REPORT_LINK_WINDOWS }}
update-final-status-windows:
runs-on: ubuntu-22.04
needs:
- e2e-tests
steps:
- uses: mattermost/actions/delivery/update-commit-status@main
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ github.event.pull_request.head.sha }}
context: e2e/windows
description: Completed with ${{ needs.e2e-tests.outputs.NEW_FAILURES_WINDOWS }} failures
status: ${{ needs.e2e-tests.outputs.STATUS_WINDOWS }}
target_url: ${{ needs.e2e-tests.outputs.REPORT_LINK_WINDOWS }}
e2e-remove-label:
if: ${{ always() && contains(github.event.pull_request.labels.*.name, 'Run Desktop E2E Tests') }}

View File

@@ -24,7 +24,7 @@ const electronBinaryPath = (() => {
const exeExtension = (process.platform === 'win32') ? '.exe' : '';
return path.join(sourceRootDir, 'node_modules/electron/dist/electron' + exeExtension);
})();
const userDataDir = path.join(sourceRootDir, 'e2e/testUserData/');
const userDataDir = path.join(sourceRootDir, 'e2e/testUserData');
const configFilePath = path.join(userDataDir, 'config.json');
const downloadsFilePath = path.join(userDataDir, 'downloads.json');
const downloadsLocation = path.join(userDataDir, 'Downloads');
@@ -217,17 +217,9 @@ module.exports = {
RESOURCES_PATH: userDataDir,
},
executablePath: electronBinaryPath,
args: [`${path.join(sourceRootDir, 'e2e/dist')}`, `--user-data-dir=${userDataDir}`, '--disable-dev-mode', '--no-sandbox', ...args],
args: [`${path.join(sourceRootDir, 'e2e/dist')}`, `--user-data-dir=${userDataDir}`, '--disable-dev-shm-usage', '--disable-dev-mode', '--disable-gpu', '--no-sandbox', ...args],
};
// if (process.env.MM_DEBUG_SETTINGS) {
// options.chromeDriverLogPath = './chromedriverlog.txt';
// }
// if (process.platform === 'darwin' || process.platform === 'linux') {
// // on a mac, debugging port might conflict with other apps
// // this changes the default debugging port so chromedriver can run without issues.
// options.chromeDriverArgs.push('remote-debugging-port=9222');
//}
return electron.launch(options).then(async (eapp) => {
await eapp.evaluate(async ({app}) => {
const promise = new Promise((resolve) => {

173
e2e/package-lock.json generated
View File

@@ -12,15 +12,15 @@
"dependencies": {
"@aws-sdk/client-s3": "3.758.0",
"@aws-sdk/lib-storage": "3.758.0",
"@electron/rebuild": "3.7.1",
"axios": "1.7.4",
"chai": "4.5.0",
"@electron/rebuild": "4.0.0",
"axios": "1.9.0",
"chai": "5.2.0",
"electron-mocha": "13.1.0",
"fast-xml-parser": "^4.4.1",
"mochawesome": "7.1.3",
"nan": "2.22.2",
"node-abi": "3.71.0",
"playwright": "1.51.0",
"node-abi": "4.5.0",
"playwright": "1.52.0",
"ps-node": "0.1.6",
"recursive-readdir": "2.2.3",
"robotjs": "0.6.0"
@@ -961,9 +961,9 @@
}
},
"node_modules/@electron/rebuild": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.7.1.tgz",
"integrity": "sha512-sKGD+xav4Gh25+LcLY0rjIwcCFTw+f/HU1pB48UVbwxXXRGaXEqIH0AaYKN46dgd/7+6kuiDXzoyAEvx1zCsdw==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.0.0.tgz",
"integrity": "sha512-ilVZIehe+CzmAEVZCcblKzmZTbxNfyv1BQbqXxuhCUJH42468VtVt1Q9qM9OroZuwAdAh1MqjFrXwWjwxPJo/w==",
"license": "MIT",
"dependencies": {
"@electron/node-gyp": "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2",
@@ -971,10 +971,10 @@
"chalk": "^4.0.0",
"debug": "^4.1.1",
"detect-libc": "^2.0.1",
"fs-extra": "^10.0.0",
"got": "^11.7.0",
"node-abi": "^3.45.0",
"node-api-version": "^0.2.0",
"graceful-fs": "^4.2.11",
"node-abi": "^4.2.0",
"node-api-version": "^0.2.1",
"ora": "^5.1.0",
"read-binary-file-arch": "^1.0.6",
"semver": "^7.3.5",
@@ -985,7 +985,7 @@
"electron-rebuild": "lib/cli.js"
},
"engines": {
"node": ">=12.13.0"
"node": ">=22.12.0"
}
},
"node_modules/@gar/promisify": {
@@ -2137,11 +2137,12 @@
}
},
"node_modules/@types/node": {
"version": "20.14.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz",
"integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==",
"version": "22.15.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz",
"integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==",
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.21.0"
}
},
"node_modules/@types/responselike": {
@@ -2243,11 +2244,12 @@
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"node_modules/assertion-error": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
"integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
"license": "MIT",
"engines": {
"node": "*"
"node": ">=12"
}
},
"node_modules/asynckit": {
@@ -2256,9 +2258,9 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
"version": "1.7.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz",
"integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==",
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
"integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
@@ -2429,21 +2431,19 @@
}
},
"node_modules/chai": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz",
"integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz",
"integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==",
"license": "MIT",
"dependencies": {
"assertion-error": "^1.1.0",
"check-error": "^1.0.3",
"deep-eql": "^4.1.3",
"get-func-name": "^2.0.2",
"loupe": "^2.3.6",
"pathval": "^1.1.1",
"type-detect": "^4.1.0"
"assertion-error": "^2.0.1",
"check-error": "^2.1.1",
"deep-eql": "^5.0.1",
"loupe": "^3.1.0",
"pathval": "^2.0.0"
},
"engines": {
"node": ">=4"
"node": ">=12"
}
},
"node_modules/chalk": {
@@ -2473,14 +2473,12 @@
}
},
"node_modules/check-error": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
"integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==",
"dependencies": {
"get-func-name": "^2.0.2"
},
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz",
"integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==",
"license": "MIT",
"engines": {
"node": "*"
"node": ">= 16"
}
},
"node_modules/chokidar": {
@@ -2711,13 +2709,10 @@
}
},
"node_modules/deep-eql": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz",
"integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",
"integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",
"license": "MIT",
"dependencies": {
"type-detect": "^4.0.0"
},
"engines": {
"node": ">=6"
}
@@ -3089,14 +3084,6 @@
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/get-func-name": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
"integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
"engines": {
"node": "*"
}
},
"node_modules/get-stream": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
@@ -3558,12 +3545,10 @@
}
},
"node_modules/loupe": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz",
"integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==",
"dependencies": {
"get-func-name": "^2.0.1"
}
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz",
"integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==",
"license": "MIT"
},
"node_modules/lowercase-keys": {
"version": "2.0.0",
@@ -3923,20 +3908,22 @@
}
},
"node_modules/node-abi": {
"version": "3.71.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz",
"integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-4.5.0.tgz",
"integrity": "sha512-bjO1R1ylXYB1oC0RTm5yy+8yBjlIfhYK1Un44tyMQkVETrrg68TIw4yKP4wzpi9UxIZ2pXzp2pixo/kqoXfjGw==",
"license": "MIT",
"dependencies": {
"semver": "^7.3.5"
"semver": "^7.6.3"
},
"engines": {
"node": ">=10"
"node": ">=22.12.0"
}
},
"node_modules/node-api-version": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.0.tgz",
"integrity": "sha512-fthTTsi8CxaBXMaBAD7ST2uylwvsnYxh2PfaScwpMhos6KlSFajXQPcM4ogNE1q2s3Lbz9GCGqeIHC+C6OZnKg==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.1.tgz",
"integrity": "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==",
"license": "MIT",
"dependencies": {
"semver": "^7.3.5"
}
@@ -4158,11 +4145,12 @@
}
},
"node_modules/pathval": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
"integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz",
"integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==",
"license": "MIT",
"engines": {
"node": "*"
"node": ">= 14.16"
}
},
"node_modules/picomatch": {
@@ -4177,11 +4165,12 @@
}
},
"node_modules/playwright": {
"version": "1.51.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.51.0.tgz",
"integrity": "sha512-442pTfGM0xxfCYxuBa/Pu6B2OqxqqaYq39JS8QDMGThUvIOCd6s0ANDog3uwA0cHavVlnTQzGCN7Id2YekDSXA==",
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.52.0.tgz",
"integrity": "sha512-JAwMNMBlxJ2oD1kce4KPtMkDeKGHQstdpFPcPH3maElAXon/QZeTvtsfXmTMRyO9TslfoYOXkSsvao2nE1ilTw==",
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.51.0"
"playwright-core": "1.52.0"
},
"bin": {
"playwright": "cli.js"
@@ -4194,9 +4183,10 @@
}
},
"node_modules/playwright-core": {
"version": "1.51.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.51.0.tgz",
"integrity": "sha512-x47yPE3Zwhlil7wlNU/iktF7t2r/URR3VLbH6EknJd/04Qc/PSJ0EY3CMXipmglLG+zyRxW6HNo2EGbKLHPWMg==",
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.52.0.tgz",
"integrity": "sha512-l2osTgLXSMeuLZOML9qYODUQoPPnUsKsb5/P6LJ2e6uPKXUdPK5WYhN4z03G+YNbWmGDY4YENauNu4ZKczreHg==",
"license": "Apache-2.0",
"bin": {
"playwright-core": "cli.js"
},
@@ -4720,9 +4710,10 @@
"optional": true
},
"node_modules/semver": {
"version": "7.6.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
"version": "7.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
},
@@ -5076,19 +5067,11 @@
"node": "*"
}
},
"node_modules/type-detect": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz",
"integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==",
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"license": "MIT"
},
"node_modules/unique-filename": {
"version": "2.0.1",

View File

@@ -8,7 +8,7 @@
"run:e2e": "npm run build && npm run test",
"build": "webpack-cli --config webpack.config.js",
"build:performance": "webpack-cli --config webpack.config.performance.js",
"test": "electron-mocha --reporter mochawesome dist/e2e_bundle.js",
"test": "electron-mocha --no-sandbox --disable-gpu-sandbox --reporter mochawesome dist/e2e_bundle.js",
"test:performance": "electron-mocha --reporter json --reporter-option output=./performance/perf-test-report.json dist/e2e_bundle.js",
"send-report": "node ./save_report.js",
"postinstall": "patch-package && cross-env CL='/std:c++17' electron-rebuild -m ./node_modules/robotjs"
@@ -26,15 +26,15 @@
"dependencies": {
"@aws-sdk/client-s3": "3.758.0",
"@aws-sdk/lib-storage": "3.758.0",
"@electron/rebuild": "3.7.1",
"axios": "1.7.4",
"chai": "4.5.0",
"@electron/rebuild": "4.0.0",
"axios": "1.9.0",
"chai": "5.2.0",
"electron-mocha": "13.1.0",
"fast-xml-parser": "^4.4.1",
"mochawesome": "7.1.3",
"nan": "2.22.2",
"node-abi": "3.71.0",
"playwright": "1.51.0",
"node-abi": "4.5.0",
"playwright": "1.52.0",
"ps-node": "0.1.6",
"recursive-readdir": "2.2.3",
"robotjs": "0.6.0"

View File

@@ -0,0 +1,13 @@
diff --git a/node_modules/@electron/rebuild/lib/electron-locator.js b/node_modules/@electron/rebuild/lib/electron-locator.js
index 9044eea..ee49c05 100644
--- a/node_modules/@electron/rebuild/lib/electron-locator.js
+++ b/node_modules/@electron/rebuild/lib/electron-locator.js
@@ -6,7 +6,7 @@ const electronModuleNames = ['electron', 'electron-prebuilt-compile'];
async function locateModuleByImport() {
for (const moduleName of electronModuleNames) {
try {
- const modulePath = path.resolve(fileURLToPath(import.meta.resolve(path.join(moduleName, 'package.json'))), '..');
+ const modulePath = path.resolve(fileURLToPath(import.meta.resolve(moduleName)), '..');
if (fs.existsSync(path.join(modulePath, 'package.json'))) {
return modulePath;
}

View File

@@ -15,7 +15,7 @@ export async function triggerTestNotification(firstServer) {
}
export async function verifyNotificationRecievedinDM(firstServer, afterbadgeValue) {
await firstServer.click('#accountSettingsHeader > button.close');
await firstServer.click('div.modal-header button[aria-label="Close"]');
const sidebarLink = await firstServer.locator('a.SidebarLink:has-text("system-bot")');
const badgeElement = await sidebarLink.locator('span.badge');
const badgeCount = await badgeElement.textContent();