E2E/Cypress: Upgrade cypress to 15.18 and its deps (#37278)

* chore: cypress upgrade to 15.18 and its deps

* handle non-zero exit
This commit is contained in:
sabril
2026-07-06 10:25:08 +08:00
committed by GitHub
parent ce23427d98
commit 87b7433d2d
5 changed files with 1797 additions and 2946 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ case $MME2E_OSTYPE in
export IS_LINUX="-linux"
;;
darwin )
export BROWSER_DEFAULT="electron"
export BROWSER_DEFAULT="chrome"
export IS_LINUX=""
;;
* )
+8 -3
View File
@@ -232,6 +232,7 @@ $(if mme2e_is_token_in_list "cypress" "$ENABLED_DOCKER_SERVICES"; then
echo '
cypress:
image: "cypress/browsers:node-24.14.0-chrome-145.0.7632.116-1-ff-148.0-edge-145.0.3800.70-1"
platform: linux/amd64
entrypoint: ["/bin/bash", "-c"]
command: ["until [ -f /var/run/mm_terminate ]; do sleep 5; done"]
env_file:
@@ -254,16 +255,20 @@ $(if mme2e_is_token_in_list "cypress" "$ENABLED_DOCKER_SERVICES"; then
# avoid too many progress messages
# https://github.com/cypress-io/cypress/issues/1243
CI: "1"
# Use /tmp for Cypress cache and config so any UID can write without permission issues
CYPRESS_CACHE_FOLDER: /tmp/cypress-cache
XDG_CONFIG_HOME: /tmp/xdg-config
# Ensure we are independent from the global node environment
PATH: /cypress/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PATH: /e2e-tests/cypress/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ulimits:
nofile:
soft: 8096
hard: 1048576
working_dir: /cypress
working_dir: /e2e-tests/cypress
network_mode: host
volumes:
- "../../e2e-tests/cypress/:/cypress"'
- "../../e2e-tests/cypress/:/e2e-tests/cypress"
- "../../webapp/platform/eslint-plugin/:/webapp/platform/eslint-plugin"'
fi)
$(if mme2e_is_token_in_list "webhook-interactions" "$ENABLED_DOCKER_SERVICES"; then
+16 -3
View File
@@ -18,13 +18,26 @@ firefox: $(firefox --version || true)
INNEREOF
EOF
mme2e_log "Prepare Cypress: ensure container user entry exists for UID $MME2E_UID"
${MME2E_DC_SERVER} exec -T -- cypress bash <<EOF
getent passwd $MME2E_UID >/dev/null 2>&1 || \
useradd --uid $MME2E_UID --gid 0 --home /root --no-create-home --shell /bin/bash mme2euser 2>/dev/null || true
EOF
mme2e_log "Prepare Cypress: install dependencies"
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress bash <<EOF
cd webapp/
npm install --cache /tmp/empty-cache
cd ../e2e-tests/cypress
npm install --cache /tmp/empty-cache
EOF
# cypress install verifies the Electron binary, which needs a display and dbus session.
# Use xvfb-run and dbus-run-session for the headless virtual display and bus.
${MME2E_DC_SERVER} exec -T -u "$MME2E_UID" -- cypress bash <<'EOF'
set -euo pipefail
Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp &
XVFB_PID=$!
trap 'kill "$XVFB_PID" 2>/dev/null || true' EXIT
sleep 1
DISPLAY=:99 dbus-run-session -- cypress install
EOF
# Initialize cypress report directory
mme2e_log "Prepare Cypress: clean and initialize report and logs directory"
+1751 -2918
View File
File diff suppressed because it is too large Load Diff
+21 -21
View File
@@ -1,14 +1,14 @@
{
"name": "cypress",
"devDependencies": {
"@aws-sdk/client-s3": "3.1030.0",
"@aws-sdk/lib-storage": "3.1030.0",
"@cypress/request": "3.0.10",
"@cypress/webpack-preprocessor": "7.1.0",
"@mattermost/client": "11.5.0",
"@aws-sdk/client-s3": "3.1075.0",
"@aws-sdk/lib-storage": "3.1075.0",
"@cypress/request": "4.0.1",
"@cypress/webpack-preprocessor": "7.1.1",
"@mattermost/client": "11.8.0",
"@mattermost/eslint-plugin": "file:../../webapp/platform/eslint-plugin",
"@mattermost/types": "11.5.0",
"@testing-library/cypress": "10.1.0",
"@mattermost/types": "11.8.0",
"@testing-library/cypress": "10.1.3",
"@types/async": "3.2.25",
"@types/authenticator": "1.1.4",
"@types/express": "5.0.6",
@@ -23,28 +23,28 @@
"@types/shelljs": "0.10.0",
"async": "3.2.6",
"authenticator": "1.1.5",
"axios": "1.15.0",
"axios": "1.18.1",
"chai": "6.2.2",
"chalk": "5.6.2",
"client-oauth2": "github:larkox/js-client-oauth2#e24e2eb5dfcbbbb3a59d095e831dbe0012b0ac49",
"cross-env": "10.1.0",
"cypress": "15.13.1",
"cypress": "15.18.0",
"cypress-file-upload": "5.0.8",
"cypress-multi-reporters": "2.0.5",
"cypress-plugin-tab": "2.0.0",
"cypress-real-events": "1.15.0",
"cypress-wait-until": "3.0.2",
"dayjs": "1.11.20",
"dayjs": "1.11.21",
"deepmerge": "4.3.1",
"dotenv": "17.4.2",
"eslint": "9.39.3",
"eslint-plugin-cypress": "^6.3.1",
"eslint-plugin-no-only-tests": "^3.4.0",
"eslint-plugin-cypress": "6.4.1",
"eslint-plugin-no-only-tests": "3.4.0",
"express": "5.2.1",
"extract-zip": "2.0.1",
"globals": "17.5.0",
"jiti": "2.6.1",
"knex": "3.2.9",
"globals": "17.7.0",
"jiti": "2.7.0",
"knex": "3.3.0",
"localforage": "1.10.0",
"lodash.intersection": "4.4.0",
"lodash.mapkeys": "4.6.0",
@@ -52,22 +52,22 @@
"lodash.xor": "4.5.0",
"mime": "4.1.0",
"mime-types": "3.0.2",
"mocha": "11.7.5",
"mocha": "11.7.6",
"mocha-junit-reporter": "2.2.1",
"mocha-multi-reporters": "1.5.1",
"mochawesome": "7.1.4",
"mochawesome-merge": "5.1.1",
"mochawesome-report-generator": "6.3.2",
"moment-timezone": "0.6.1",
"moment-timezone": "0.6.2",
"node-polyfill-webpack-plugin": "4.1.0",
"pdf-parse": "2.4.5",
"pg": "8.20.0",
"pg": "8.22.0",
"recursive-readdir": "2.2.3",
"shelljs": "0.10.0",
"timezones.json": "1.7.2",
"ts-loader": "9.5.7",
"typescript": "6.0.2",
"uuid": "13.0.0",
"ts-loader": "9.6.2",
"typescript": "6.0.3",
"uuid": "14.0.1",
"yargs": "18.0.0"
},
"overrides": {