forked from snowplow/snowplow-javascript-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwdio.default.conf.ts
More file actions
42 lines (39 loc) · 1.56 KB
/
Copy pathwdio.default.conf.ts
File metadata and controls
42 lines (39 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { DockerWrapper, start, stop } from './micro';
import { setValue } from '@wdio/shared-store-service';
import type { Options } from '@wdio/types';
function getFullPath(path: string): string {
return process.cwd() + '/' + path;
}
type CustomTestRunnerConfig = Options.Testrunner & { dockerInstance?: DockerWrapper };
export const config: Omit<Options.Testrunner, 'capabilities'> = {
specs: [[
getFullPath('test/functional/*.test.ts'),
getFullPath('test/integration/*.test.ts'),
getFullPath('test/media/media.test.ts'),
getFullPath('test/performance/*.test.ts'),
// YouTube and Vimeo tests are disabled since they block SauceLabs on CI
]],
logLevel: 'warn',
baseUrl: 'http://snowplow-js-tracker.local:8080',
waitforTimeout: 30000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
specFileRetries: 1,
specFileRetriesDelay: 60, // Delay in seconds between the spec file retry attempts
specFileRetriesDeferred: true, // Defer retries to the end of the queue
maxInstances: 5, // Maximum number of total parallel running workers
framework: 'jasmine',
reporters: ['spec'],
jasmineOpts: {
defaultTimeoutInterval: 120000,
},
async onPrepare(config: CustomTestRunnerConfig) {
const isSauce = config.services?.some((service) => Array.isArray(service) && service[0] === 'sauce');
config.dockerInstance = await start(isSauce);
await setValue('dockerInstanceUrl', config.dockerInstance.url);
return;
},
async onComplete(_, config: CustomTestRunnerConfig) {
await stop(config.dockerInstance!.container);
},
};