-
Notifications
You must be signed in to change notification settings - Fork 31
/
wdio.base.config.js
58 lines (54 loc) · 1.4 KB
/
wdio.base.config.js
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const { UtamWdioService } = require('wdio-utam-service');
const { createServer } = require('lwr');
let server;
const onPrepare = async () => {
try {
server = createServer({ serverMode: 'prod-compat' });
const { port, serverMode } = await server.listen();
console.log(`[LWR Service] App listening on port ${port} in ${serverMode} mode\n`);
} catch (error) {
console.error('Error starting LWR Service:', error);
}
};
// Shut the server down once tests are complete
const onComplete = async () => {
if (server) {
try {
await server.close();
console.log('LWR Service stopped.');
} catch (error) {
console.error('Error stopping LWR Service:', error);
}
}
};
exports.config = {
framework: 'jasmine',
jasmineOpts: {
defaultTimeoutInterval: 10000, // 10 seconds
},
capabilities: [
{
browserName: 'chrome',
'goog:chromeOptions': {
args: ['--disable-gpu', '--no-sandbox'],
},
},
],
logLevel: 'info',
bidi: false,
waitforTimeout: 10000,
services: [
[
UtamWdioService,
{
/* UTAM specific properties */
},
],
['utam'],
],
reporters: ['spec'],
runner: 'local',
baseUrl: 'http://localhost:3000',
onPrepare,
onComplete,
};