mattermost-mobile/detox/e2e/config.js
yasser khan 3cbde1663d
E2E feature schedule posts (#8709)
- Fix iOS and Android CI.
- Fixes E2E tests on both platform
- Added tests for scheduled draft feature.
2025-04-23 12:10:37 +05:30

45 lines
1.6 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
const platform = process.env.IOS === 'true' ? 'ios' : 'android';
const shard = process.env.CI_NODE_INDEX ? process.env.CI_NODE_INDEX : '';
module.exports = {
setupFilesAfterEnv: ['./test/setup.ts'],
maxWorkers: 1,
testSequencer: './custom_sequencer.js',
testTimeout: 180000,
rootDir: '.',
testMatch: ['<rootDir>/test/**/*.e2e.ts'],
transform: {
'\\.ts?$': 'ts-jest',
},
reporters: [
'detox/runners/jest/reporter',
['jest-junit', {
suiteName: 'Mobile App E2E with Detox and Jest',
outputDirectory: './artifacts',
outputName: `${platform}-junit${shard}.xml`,
uniqueOutputName: false,
}],
['jest-html-reporters', {
pageTitle: 'Mobile App E2E with Detox and Jest',
publicPath: './artifacts',
filename: `${platform}-report${shard}.html`,
expand: false,
}],
['jest-stare', {
reportHeadline: 'Mobile App E2E with Detox and Jest',
resultDir: './artifacts/jest-stare',
resultJson: `${platform}-data${shard}.json`,
resultHtml: `${platform}-main${shard}.html`,
}],
],
globalSetup: 'detox/runners/jest/globalSetup',
globalTeardown: 'detox/runners/jest/globalTeardown',
testEnvironment: 'detox/runners/jest/testEnvironment',
verbose: true,
moduleNameMapper: {
'^@support/(.*)': '<rootDir>/support/$1',
},
};