mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-04 09:58:57 +00:00
* fix: read manual time entry from both datetime config keys, and unblock main-branch E2E (#10174) Apps form: Reads both manual_time_entry and the deprecated allow_manual_time_entry keys, preserving compatibility across supported server versions. Tests cover both keys, precedence, and the unset case. Channel Attributes E2E: Gates the suite on the presence of the server feature flag so it does not run against 11.x servers where the feature does not exist. E2E reliability: Fixes several main-branch failure modes, including cross-shard interference from server-global required channel attributes, Maestro account-screen timing, transient channel-creation failures, and bookmark setup/recovery after ambiguous network responses. Bookmark setup: Makes channel creation idempotent by name and verifies membership through a read-back rather than blindly retrying writes. Test coverage: Adds component-level coverage for the not_set channel-attribute state while documenting the intended re-homing of the skipped E2E case. Test conventions/documentation: Aligns new test names and comments with project conventions and clarifies server-version behavior. (cherry picked from commit4f5b83e6af) * test(e2e): make CMT and PR E2E green (absorbs #10186) (#10184) test(e2e): stabilize mobile suites and shared-server configuration - Restore Android character-limit coverage with realistic word-based payloads. - Use a time-based grace period for classification-lock transport failures, resetting it after each successful request. - Pin the demo plugin to v0.12.1 and replace mismatched installations using the multipart upload force flag. - Recover uncertain channel creation through read-back, retry transient membership and profile-update failures, and check setup results. - Improve sidebar navigation, channel-info recovery, tooltip dismissal, archived-channel assertions, and archived-search retries. - Verify banner attributes before UI assertions and report observed failures without attributing unsupported causes. - Reduce ChannelAttributes flag changes, retry app reloads, strengthen feature-state assertions, and remove unsafe full-config updates. - Check configuration writability and environment overrides before patching; verify the app reflects AllowDownloadLogs and fix Maestro text matching. - Increase the Jest timeout to accommodate existing test waits. (cherry picked from commit72e74b8785)
41 lines
1.7 KiB
JavaScript
41 lines
1.7 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
// eslint-disable-next-line no-process-env
|
|
process.env.TZ = 'UTC';
|
|
|
|
module.exports = {
|
|
preset: 'jest-expo',
|
|
verbose: true,
|
|
globals: {
|
|
'ts-jest': {
|
|
tsConfigFile: 'tsconfig.test.json',
|
|
},
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
clearMocks: true,
|
|
|
|
// Jest's 5s default is shorter than the in-test waits these suites already declare
|
|
// (a 10s waitFor around a WatermelonDB write can never finish inside it), so a loaded
|
|
// CI runner kills the test before its own assertion gets a chance to run.
|
|
testTimeout: 30000,
|
|
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
|
|
collectCoverageFrom: ['app/**/*.{js,jsx,ts,tsx}'],
|
|
coverageReporters: ['lcov', 'text-summary', 'json-summary'],
|
|
testPathIgnorePatterns: ['/node_modules/', '/detox/'],
|
|
coveragePathIgnorePatterns: ['/node_modules/', '/components/', '/screens/', '/routes/'],
|
|
transformIgnorePatterns: [
|
|
'node_modules/(?!' +
|
|
'(@react-native|react-native)|' +
|
|
'expo(?:-[^/]+)?|@expo|expo-modules-core|uuid|' +
|
|
'@sentry/react-native|' +
|
|
'react-intl|@formatjs/[^/]+|intl-messageformat|@messageformat/[^/]+|' +
|
|
'validator|' +
|
|
'hast-util-from-selector|hastscript|property-information|hast-util-parse-selector|space-separated-tokens|comma-separated-tokens|zwitch|' +
|
|
'@mattermost/calls|@mattermost/rnutils|@mattermost/hardware-keyboard|@mattermost/rnshare|@mattermost/secure-pdf-viewer|@mattermost/compass-icons|' +
|
|
'@rneui/base|' +
|
|
'@shopify/flash-list|' +
|
|
'ratex-react-native)',
|
|
],
|
|
};
|