mattermost-mobile-upstream/detox/package.json
yasser khan dfc94b3c3c
test(e2e): close manual release-test gaps (#10125)
Closes manual release-test gaps for mobile (Detox + Maestro), automating new test cases and hardening flaky/CI-only failures uncovered along the way.

### New coverage automated
- **MM-T416** offline/online post-retry (Android via airplane mode; iOS ultimately marked unsupported — see below)
- **MM-T1194 / MM-T1193** custom ToS accept/decline survives relaunch
- **MM-T3251** status change via account UI (cross-user visibility)
- **MM-T510** channel-wide/keyword mention delivery — later expanded to a full 5-channel mention matrix with exact server-side counts
- **MM-T3261 (_1/_2)** Report a Problem external hand-off (browser link mode, email mode)
- **MM-T2940** iOS managed-config (MDM) pre-fill/autoconnect
- **MM-T3271/3272** opening the app from a push notification (synthetic notification payloads, background/closed states)
- Un-skipped several tests that turned out to already pass (stale skips)

### Root-caused failing tests
- **Android SQLite corruption**: traced to native Kotlin DB connections not opening in WAL mode while JSI did (post #10109) — journal-mode mismatch corrupted the store on push-triggered writes. Fixed properly with a **WAL patch** (#10117) rather than the original destructive "wipe app database" workaround, which was reverted.
- **Fabric crash** (`addViewAt`/reparent) on `SlideUpPanelItem` taps — root-caused to view flattening racing sheet mounts; fixed with `collapsable={false}` (went through a revert/re-revert once CI reproduced the crash without it).
- **Search race**: stale in-flight search results could overwrite a cleared search box — fixed with request-id tagging.
- **iOS offline detection**: multiple iterations (AAAA sampling → Cloudflare-prefix check → final decision) landed on refusing iOS offline simulation outright, since all E2E servers are Cloudflare-fronted/anycast and the address space can't be enumerated/blocked.
- **MM-T3261 config patch** intermittently silently ignored by the server — root-caused to `ReportAProblemType` being environment-managed on PR Spinwicks (config PATCH returns 200 but is silently dropped); now detected and reported as a skip with proven cause, not a failure.
- **MM-T416 failed-post timing**: multiple rounds of tightening the wait bound to match the client's actual retry/backoff/timeout ceiling (ended at ~150s, derived from OkHttp/retry-interceptor math, not guessed).
- **MM-T5603 upload wait**: raised to match the client's real 180s upload timeout.
- **Classification banner suite**: fixed to verify config state directly instead of trusting a PATCH reply that the cloud sometimes drops.

### CI/reporting infra fixes
- Dedicated Maestro steps (MM-T3261, MM-T67856_4) weren't feeding into the merged JUnit report and couldn't gate pass/fail — fixed report merging/naming so they now count.
- Android Maestro logcat capture added (previously iOS-only diagnostics).
- Jest retry logic no longer discards passing results from a shard killed by timeout.
- Sharding raised 24→28.
- Removed dead Detox Pilot/Playbooks scaffolding (unused, uncovered by CI).

### Cleanup
- Comment/docs pass stripping narrative session-archaeology from long explanatory comments, keeping only load-bearing facts and CI references.
2026-09-11 09:48:02 +05:30

74 lines
3.5 KiB
JSON

{
"name": "mattermost-mobile-e2e",
"description": "End-to-end testing for Mattermost Mobile",
"repository": "git@github.com:mattermost/mattermost-mobile.git",
"author": "Mattermost, Inc.",
"devDependencies": {
"@aws-sdk/client-s3": "3.937.0",
"@aws-sdk/lib-storage": "3.937.0",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-transform-modules-commonjs": "7.26.3",
"@babel/plugin-transform-runtime": "7.25.9",
"@babel/preset-env": "7.26.0",
"@jest/test-sequencer": "29.7.0",
"@types/jest": "29.5.14",
"@types/tough-cookie": "4.0.5",
"@types/uuid": "10.0.0",
"async": "3.2.6",
"axios": "1.8.2",
"axios-cookiejar-support": "5.0.4",
"babel-jest": "29.7.0",
"babel-plugin-module-resolver": "5.0.2",
"client-oauth2": "4.3.3",
"deepmerge": "4.3.1",
"detox": "20.51.3",
"dotenv": "17.2.1",
"express": "^5.2.1",
"form-data": "4.0.1",
"jest": "29.7.0",
"jest-circus": "29.7.0",
"jest-cli": "29.7.0",
"jest-junit": "16.0.0",
"jest-stare": "2.5.3",
"junit-report-merger": "7.0.0",
"moment-timezone": "0.5.46",
"patch-package": "8.0.0",
"recursive-readdir": "2.2.3",
"sanitize-filename": "1.6.3",
"shelljs": "0.8.5",
"tough-cookie": "5.0.0",
"ts-jest": "29.2.5",
"tslib": "2.8.1",
"tsx": "^4.19.3",
"typescript": "5.7.2",
"uuid": "11.0.3",
"xml2js": "0.6.2"
},
"scripts": {
"e2e:android-create-emulator": "./create_android_emulator.sh",
"e2e:android-build": "./scripts/run_detox.sh build -c android.emu.debug",
"e2e:android-test": "npm run detox:config-gen && ./scripts/run_detox.sh test -c android.emu.debug --record-logs failing --take-screenshots failing",
"e2e:android-build-release": "./scripts/run_detox.sh build -c android.emu.release",
"e2e:android-test-release": "npm run detox:config-gen && ./scripts/run_detox.sh test -c android.emu.release --record-logs failing --take-screenshots failing",
"e2e:ios-build": "IOS=true ./scripts/run_detox.sh build -c ios.sim.debug",
"e2e:ios-test": "IOS=true ./scripts/run_detox.sh test -c ios.sim.debug --record-logs failing --take-screenshots failing",
"e2e:ios-ipad-test": "IOS=true ./scripts/run_detox.sh test -c ios.ipad.debug --record-logs failing --take-screenshots failing",
"e2e:ios-build-release": "IOS=true ./scripts/run_detox.sh build -c ios.sim.release",
"e2e:ios-test-release": "IOS=true ./scripts/run_detox.sh test -c ios.sim.release --record-logs failing --take-screenshots failing",
"e2e:ios-disable-autofill": "cd utils && node disable_ios_autofill.js",
"detox:config-gen": "cd utils && node generate_detox_config_ci.js",
"check": "npm run lint && npm run tsc && npm run test:unit && npm run validate:flow-headers",
"validate:flow-headers": "bash maestro/scripts/validate-flow-headers.sh",
"test:unit": "node --test utils/*.test.js && npx tsx --test e2e/support/utils/transport_retry.test.ts && npx tsx --test e2e/support/classification_lock_core.test.ts && npx tsx --test e2e/support/classification_test_helper.test.ts && npx tsx --test e2e/support/server_api/client.test.ts",
"clean-detox": "detox clean",
"lint": "eslint --ignore-pattern node_modules --quiet .",
"e2e:save-report": "node save_report.js",
"e2e:save-maestro-zephyr": "node save_maestro_zephyr.js",
"start:webhook": "node webhook_server.js",
"provision": "tsx provision/index.ts",
"tsc": "NODE_OPTIONS=--max_old_space_size=12000 tsc --noEmit",
"postinstall": "node scripts/postinstall.js"
},
"dependencies": {}
}