@open-xchange/appsuite-codeceptjs 0.6.16 → 0.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +9 -0
- package/container/Dockerfile +1 -1
- package/package.json +3 -3
- package/src/actor.js +27 -24
- package/src/appsuiteHttpClient.js +2 -2
- package/src/chai.js +28 -28
- package/src/helper.js +131 -11
- package/src/util.js +16 -1
- package/eslint.config.mjs +0 -73
package/container/Dockerfile
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
FROM registry.gitlab.com/openxchange/appsuite/web-foundation/base-images/playwright:v1.
|
|
1
|
+
FROM registry.gitlab.com/openxchange/appsuite/web-foundation/base-images/playwright:v1.58.2-noble
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/appsuite-codeceptjs",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.18",
|
|
4
4
|
"description": "OX App Suite CodeceptJS Configuration and Helpers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@codeceptjs/helper": "^2.0.4",
|
|
19
19
|
"@influxdata/influxdb-client": "^1.35.0",
|
|
20
20
|
"@open-xchange/appsuite-codeceptjs-pageobjects": "^1.1.0",
|
|
21
|
-
"@playwright/test": "1.
|
|
21
|
+
"@playwright/test": "1.58.2",
|
|
22
22
|
"allure-codeceptjs": "2.15.1",
|
|
23
23
|
"chai": "^6.2.1",
|
|
24
24
|
"chalk": "^4.1.2",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"moment": "^2.30.1",
|
|
32
32
|
"moment-timezone": "^0.6.0",
|
|
33
33
|
"p-retry": "^7.1.1",
|
|
34
|
-
"playwright-core": "1.
|
|
34
|
+
"playwright-core": "1.58.2",
|
|
35
35
|
"short-uuid": "^6.0.3",
|
|
36
36
|
"@open-xchange/soap-client": "0.0.10",
|
|
37
37
|
"@open-xchange/codecept-horizontal-scaler": "0.1.14"
|
package/src/actor.js
CHANGED
|
@@ -23,7 +23,7 @@ const { expect } = require('@playwright/test')
|
|
|
23
23
|
const util = require('./util')
|
|
24
24
|
const codecept = require('codeceptjs')
|
|
25
25
|
|
|
26
|
-
module.exports = function () {
|
|
26
|
+
module.exports = function (customSteps) {
|
|
27
27
|
const baseURL = util.getURLRoot()
|
|
28
28
|
|
|
29
29
|
return actor({
|
|
@@ -32,9 +32,16 @@ module.exports = function () {
|
|
|
32
32
|
this.amOnPage(baseURL)
|
|
33
33
|
},
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
waitForApp () {
|
|
36
|
+
this.waitForInvisible('#background-loader.busy', 30)
|
|
37
|
+
this.waitForVisible({ css: 'html.complete' }, 10)
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
openApp (appName, options) {
|
|
36
41
|
this.click('~Navigate to:')
|
|
37
42
|
this.click(appName, '.apps')
|
|
43
|
+
options = { wait: true, ...options }
|
|
44
|
+
if (options.wait) this.waitForApp()
|
|
38
45
|
},
|
|
39
46
|
|
|
40
47
|
/**
|
|
@@ -62,38 +69,33 @@ module.exports = function () {
|
|
|
62
69
|
* After successful login, the page will be navigated to the specified URL with the URL parameters.
|
|
63
70
|
* If the 'isDeepLink' option is true, the URL will be constructed with a '#' prefix.
|
|
64
71
|
* The login process also includes waiting for the page to load and checking for the presence of the app.
|
|
65
|
-
* @param {string[]|
|
|
72
|
+
* @param {string[]|string} urlParams - The URL parameters as an array or string.
|
|
66
73
|
* @param {object} options - The login options.
|
|
67
|
-
* @returns {Promise<void>} - A promise that resolves when the login process is complete.
|
|
68
74
|
*/
|
|
69
|
-
|
|
75
|
+
login (urlParams, options) {
|
|
70
76
|
if (urlParams && !urlParams.length) {
|
|
71
77
|
// looks like an object, not string or array
|
|
72
78
|
options = urlParams
|
|
73
|
-
urlParams =
|
|
79
|
+
urlParams = undefined
|
|
74
80
|
}
|
|
81
|
+
options = { wait: true, ...options }
|
|
75
82
|
urlParams = [].concat(urlParams || [])
|
|
76
|
-
options
|
|
77
|
-
let user = options.user
|
|
78
|
-
|
|
79
|
-
if (typeof user === 'undefined') user = {}
|
|
83
|
+
if (!options.isDeepLink) urlParams.unshift('!!')
|
|
84
|
+
let user = util.resolveUser(options.user)
|
|
80
85
|
if (user.toJSON) user = user.toJSON()
|
|
81
86
|
const loginName = process.env.PROVISIONING_API === 'reseller' ? user.name : `${user.name}${user.context.id ? '@' + user.context.id : ''}`
|
|
82
|
-
|
|
87
|
+
this.makeApiRequest('POST', `${baseURL}/api/login`, {
|
|
83
88
|
params: { action: 'login', client: 'open-xchange-appsuite' },
|
|
84
|
-
form: {
|
|
85
|
-
name: loginName,
|
|
86
|
-
password: user.password
|
|
87
|
-
}
|
|
89
|
+
form: { name: loginName, password: user.password }
|
|
88
90
|
})
|
|
89
91
|
this.wait(0.5)
|
|
90
|
-
this.amOnPage(`${baseURL}
|
|
92
|
+
this.amOnPage(`${baseURL}/#${urlParams.join('&')}`)
|
|
91
93
|
this.waitForInvisible('#background-loader.busy', util.getLoginTimeout())
|
|
92
|
-
if (options.wait)
|
|
94
|
+
if (options.wait) this.waitForVisible({ css: 'html.complete' }, 10)
|
|
93
95
|
},
|
|
94
96
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
logout () {
|
|
98
|
+
this.makeApiRequest('POST', `${baseURL}/api/login`, { params: { action: 'logout' } })
|
|
97
99
|
this.amOnPage('about:blank')
|
|
98
100
|
},
|
|
99
101
|
|
|
@@ -107,10 +109,9 @@ module.exports = function () {
|
|
|
107
109
|
*
|
|
108
110
|
* @param {string} locator - The locator of the element. Only accepts css selectors.
|
|
109
111
|
*/
|
|
110
|
-
|
|
111
|
-
this.waitForElement(locator)
|
|
112
|
+
waitForFocus (locator) {
|
|
112
113
|
this.waitForVisible(locator)
|
|
113
|
-
|
|
114
|
+
this.usePlaywrightTo('wait for focus', async ({ page }) => {
|
|
114
115
|
await expect(page.locator(locator)).toBeFocused()
|
|
115
116
|
this.wait(0.5)
|
|
116
117
|
})
|
|
@@ -133,7 +134,7 @@ module.exports = function () {
|
|
|
133
134
|
clickDropdown (text) {
|
|
134
135
|
this.waitForVisible('.dropdown.open .dropdown-menu, .primary-action > .open .dropdown-menu')
|
|
135
136
|
this.waitForText(text, 10, '.dropdown.open .dropdown-menu, .primary-action > .open .dropdown-menu')
|
|
136
|
-
|
|
137
|
+
this.click(text, '.dropdown.open .dropdown-menu, .primary-action > .open .dropdown-menu')
|
|
137
138
|
},
|
|
138
139
|
|
|
139
140
|
clickToolbar (selector, timeout = 5) {
|
|
@@ -169,6 +170,8 @@ module.exports = function () {
|
|
|
169
170
|
selectLine () {
|
|
170
171
|
const shortcut = platform === 'darwin' ? ['Shift', 'CommandOrControl', 'ArrowLeft'] : ['Shift', 'Home']
|
|
171
172
|
this.pressKey(shortcut)
|
|
172
|
-
}
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
...customSteps
|
|
173
176
|
})
|
|
174
177
|
}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
const codecept = require('codeceptjs')
|
|
22
22
|
const querystring = require('node:querystring')
|
|
23
|
+
const util = require('./util')
|
|
23
24
|
|
|
24
25
|
const pRetry = import('p-retry').then(module => module.default)
|
|
25
26
|
|
|
@@ -58,8 +59,7 @@ async function fetchWithRetry (url, options) {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
function createHttpClient (options) {
|
|
61
|
-
|
|
62
|
-
let user = options.user || codecept.container.support('users')[0]
|
|
62
|
+
let user = util.resolveUser(options?.user)
|
|
63
63
|
if (user.toJSON) user = user.toJSON()
|
|
64
64
|
|
|
65
65
|
async function request (url, options = {}) {
|
package/src/chai.js
CHANGED
|
@@ -18,38 +18,38 @@
|
|
|
18
18
|
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
const chai = require('chai')
|
|
22
|
+
|
|
23
|
+
chai.util.addProperty(chai.Assertion.prototype, 'accessible', function () {
|
|
24
|
+
const problems = ['\n', 'Accessibility Violations (' + this._obj.violations.length + ')', '---']
|
|
25
|
+
const pad = '\n '
|
|
26
|
+
if (this._obj.violations.length) {
|
|
27
|
+
for (const violation of this._obj.violations) {
|
|
28
|
+
problems.push(pad + '[' + violation.impact.toUpperCase() + '] ' + violation.help + ' (ID: ' + violation.id + ')\n')
|
|
29
|
+
for (const node of violation.nodes) {
|
|
30
|
+
problems.push(node.failureSummary.split('\n').join(pad))
|
|
31
|
+
problems.push(' ' + node.target + ' => ' + node.html)
|
|
32
|
+
const relatedNodes = []
|
|
33
|
+
for (const combinedNodes of [node.all, node.any, node.none]) {
|
|
34
|
+
if (combinedNodes.length > 0) {
|
|
35
|
+
for (const any of combinedNodes) {
|
|
36
|
+
for (const relatedNode of any.relatedNodes) {
|
|
37
|
+
relatedNodes.push(' ' + relatedNode.target + ' => ' + relatedNode.html)
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
if (relatedNodes.length > 0) problems.push(relatedNodes.join(pad))
|
|
42
41
|
}
|
|
43
|
-
problems.push(pad
|
|
42
|
+
if (relatedNodes.length > 0) problems.push(relatedNodes.join(pad))
|
|
44
43
|
}
|
|
44
|
+
problems.push(pad + '---\n')
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
globalThis.expect = chai.expect
|
|
54
|
-
globalThis.assert = chai.assert
|
|
46
|
+
}
|
|
47
|
+
this.assert(
|
|
48
|
+
this._obj.violations.length === 0,
|
|
49
|
+
`expected to have no violations:\n ${problems.join(pad)}`,
|
|
50
|
+
'expected to have violations'
|
|
51
|
+
)
|
|
55
52
|
})
|
|
53
|
+
|
|
54
|
+
globalThis.expect = chai.expect
|
|
55
|
+
globalThis.assert = chai.assert
|
package/src/helper.js
CHANGED
|
@@ -34,6 +34,14 @@ const javascriptRoot = util.getJavascriptRoot()
|
|
|
34
34
|
|
|
35
35
|
const output = require('codeceptjs/lib/output')
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* @typedef UserOptions
|
|
39
|
+
* Optional parameters to specify a target user account.
|
|
40
|
+
* @property {object} [user]
|
|
41
|
+
* The user account to be used. If omitted, the first created user (`users[0]`)
|
|
42
|
+
* will be used.
|
|
43
|
+
*/
|
|
44
|
+
|
|
37
45
|
function delay (ms) { return new Promise(resolve => setTimeout(resolve, ms)) }
|
|
38
46
|
|
|
39
47
|
async function retryPromise (fn, timeout = 5, retryDelay = 300) {
|
|
@@ -295,6 +303,97 @@ class AppSuiteHelper extends Helper {
|
|
|
295
303
|
await devTools.send('Network.emulateNetworkConditions', presets[networkConfig.toUpperCase()] || networkConfig)
|
|
296
304
|
}
|
|
297
305
|
|
|
306
|
+
/**
|
|
307
|
+
* Changes a configuration item of a user account during a test.
|
|
308
|
+
*
|
|
309
|
+
* Use this method inside test scenarios instead of calling `await
|
|
310
|
+
* user.hasConfig()` directly to make this call part of the recorder queue,
|
|
311
|
+
* instead of executing it immediately during test step registration.
|
|
312
|
+
*
|
|
313
|
+
* @param {string} key
|
|
314
|
+
* The configuration key.
|
|
315
|
+
*
|
|
316
|
+
* @param {unknown} value
|
|
317
|
+
* The new configuration value.
|
|
318
|
+
*
|
|
319
|
+
* @param {UserOptions} [options]
|
|
320
|
+
* Optional parameters.
|
|
321
|
+
*/
|
|
322
|
+
async haveConfig (key, value, options) {
|
|
323
|
+
await util.resolveUser(options?.user).hasConfig(key, value)
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Adds a capability to a user account during a test.
|
|
328
|
+
*
|
|
329
|
+
* Use this method inside test scenarios instead of calling `await
|
|
330
|
+
* user.hasCapability()` directly to make this call part of the recorder
|
|
331
|
+
* queue, instead of executing it immediately during test step registration.
|
|
332
|
+
*
|
|
333
|
+
* @param {string} capability
|
|
334
|
+
* The capability to be added to the user account.
|
|
335
|
+
*
|
|
336
|
+
* @param {UserOptions} [options]
|
|
337
|
+
* Optional parameters.
|
|
338
|
+
*/
|
|
339
|
+
async haveCapability (capability, options) {
|
|
340
|
+
await util.resolveUser(options?.user).hasCapability(capability)
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Removes a capability from a user account during a test.
|
|
345
|
+
*
|
|
346
|
+
* Use this method inside test scenarios instead of calling `await
|
|
347
|
+
* user.doesntHaveCapability()` directly to make this call part of the
|
|
348
|
+
* recorder queue, instead of executing it immediately during test step
|
|
349
|
+
* registration.
|
|
350
|
+
*
|
|
351
|
+
* @param {string} capability
|
|
352
|
+
* The capability to be removed from the user account.
|
|
353
|
+
*
|
|
354
|
+
* @param {UserOptions} [options]
|
|
355
|
+
* Optional parameters.
|
|
356
|
+
*/
|
|
357
|
+
async dontHaveCapability (capability, options) {
|
|
358
|
+
await util.resolveUser(options?.user).doesntHaveCapability(capability)
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Changes the access combination of a user account during a test.
|
|
363
|
+
*
|
|
364
|
+
* Use this method inside test scenarios instead of calling `await
|
|
365
|
+
* user.hasAccessCombination()` directly to make this call part of the
|
|
366
|
+
* recorder queue, instead of executing it immediately during test step
|
|
367
|
+
* registration.
|
|
368
|
+
*
|
|
369
|
+
* @param {string} accessCombination
|
|
370
|
+
* The access combination to be set at the user account.
|
|
371
|
+
*
|
|
372
|
+
* @param {UserOptions} [options]
|
|
373
|
+
* Optional parameters.
|
|
374
|
+
*/
|
|
375
|
+
async haveAccessCombination (accessCombination, options) {
|
|
376
|
+
await util.resolveUser(options?.user).hasAccessCombination(accessCombination)
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Changes the module access flags of a user account during a test.
|
|
381
|
+
*
|
|
382
|
+
* Use this method inside test scenarios instead of calling `await
|
|
383
|
+
* user.hasAccessCombination()` directly to make this call part of the
|
|
384
|
+
* recorder queue, instead of executing it immediately during test step
|
|
385
|
+
* registration.
|
|
386
|
+
*
|
|
387
|
+
* @param {Record<string, boolean>} moduleAccess
|
|
388
|
+
* The module access flags to be set at the user account.
|
|
389
|
+
*
|
|
390
|
+
* @param {UserOptions} [options]
|
|
391
|
+
* Optional parameters.
|
|
392
|
+
*/
|
|
393
|
+
async haveModuleAccess (moduleAccess, options) {
|
|
394
|
+
await util.resolveUser(options?.user).hasModuleAccess(moduleAccess)
|
|
395
|
+
}
|
|
396
|
+
|
|
298
397
|
async haveSetting (obj, options) {
|
|
299
398
|
if (typeof obj === 'string') {
|
|
300
399
|
const input = obj.split('//')
|
|
@@ -393,10 +492,38 @@ class AppSuiteHelper extends Helper {
|
|
|
393
492
|
for (const mail of iterable) await this.haveMail(mail, options)
|
|
394
493
|
}
|
|
395
494
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
495
|
+
/**
|
|
496
|
+
* Adds an alias email address to a user account during a test.
|
|
497
|
+
*
|
|
498
|
+
* Use this method inside test scenarios instead of calling `await
|
|
499
|
+
* user.hasAlias()` directly to make this call part of the recorder queue,
|
|
500
|
+
* instead of executing it immediately during test step registration.
|
|
501
|
+
*
|
|
502
|
+
* @param {string} alias
|
|
503
|
+
* The alias email address to be added to the user account.
|
|
504
|
+
*
|
|
505
|
+
* @param {UserOptions} [options]
|
|
506
|
+
* Optional parameters.
|
|
507
|
+
*/
|
|
508
|
+
async haveAnAlias (alias, options) {
|
|
509
|
+
await util.resolveUser(options?.user).hasAlias(alias)
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Removes an alias email address from a user account during a test.
|
|
514
|
+
*
|
|
515
|
+
* Use this method inside test scenarios instead of calling `await
|
|
516
|
+
* user.doesntHaveAlias()` directly to make this call part of the recorder
|
|
517
|
+
* queue, instead of executing it immediately during test step registration.
|
|
518
|
+
*
|
|
519
|
+
* @param {string} alias
|
|
520
|
+
* The alias email address to be removed from the user account.
|
|
521
|
+
*
|
|
522
|
+
* @param {UserOptions} [options]
|
|
523
|
+
* Optional parameters.
|
|
524
|
+
*/
|
|
525
|
+
async dontHaveAlias (alias, options) {
|
|
526
|
+
await util.resolveUser(options?.user).doesntHaveAlias(alias)
|
|
400
527
|
}
|
|
401
528
|
|
|
402
529
|
async haveMailFilterRule (rule, options) {
|
|
@@ -792,13 +919,6 @@ class AppSuiteHelper extends Helper {
|
|
|
792
919
|
)
|
|
793
920
|
}
|
|
794
921
|
|
|
795
|
-
async waitForApp () {
|
|
796
|
-
const { Playwright } = this.helpers
|
|
797
|
-
|
|
798
|
-
await Playwright.waitForInvisible('#background-loader.busy', 30)
|
|
799
|
-
await Playwright.waitForVisible({ css: 'html.complete' }, 10)
|
|
800
|
-
}
|
|
801
|
-
|
|
802
922
|
async copyToClipboard () {
|
|
803
923
|
const helper = this.helpers.Playwright
|
|
804
924
|
const { page } = helper
|
package/src/util.js
CHANGED
|
@@ -99,6 +99,21 @@ module.exports = {
|
|
|
99
99
|
addJitter (id) {
|
|
100
100
|
const [JITTER_MIN, JITTER_MAX] = [1000, 5000]
|
|
101
101
|
return Math.trunc(id) + Math.floor(Math.random() * (JITTER_MAX - JITTER_MIN + 1) + JITTER_MIN)
|
|
102
|
-
}
|
|
102
|
+
},
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Resolves the effective user account to be used.
|
|
106
|
+
*
|
|
107
|
+
* @param {object} [user]
|
|
108
|
+
* The user account to be used. Default is the first created user.
|
|
109
|
+
*
|
|
110
|
+
* @returns {object}
|
|
111
|
+
* The passed user account if existing, otherwise the first created user
|
|
112
|
+
* account.
|
|
113
|
+
*/
|
|
114
|
+
resolveUser (user) {
|
|
115
|
+
user ??= codecept.container.support('users')[0]
|
|
116
|
+
if (!user) throw new Error('no users created')
|
|
117
|
+
return user
|
|
118
|
+
},
|
|
104
119
|
}
|
package/eslint.config.mjs
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
*
|
|
5
|
-
* This code is free software: you can redistribute it and/or modify
|
|
6
|
-
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
* (at your option) any later version.
|
|
9
|
-
*
|
|
10
|
-
* This program is distributed in the hope that it will be useful,
|
|
11
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
* GNU Affero General Public License for more details.
|
|
14
|
-
*
|
|
15
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
-
*
|
|
18
|
-
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
-
*/
|
|
20
|
-
import config from '@open-xchange/lint'
|
|
21
|
-
import mocha from 'eslint-plugin-mocha'
|
|
22
|
-
import { FlatCompat } from '@eslint/eslintrc'
|
|
23
|
-
|
|
24
|
-
import path from 'node:path'
|
|
25
|
-
import url from 'node:url'
|
|
26
|
-
|
|
27
|
-
const __filename = url.fileURLToPath(import.meta.url)
|
|
28
|
-
const __dirname = path.dirname(__filename)
|
|
29
|
-
|
|
30
|
-
const codeceptjs = new FlatCompat({
|
|
31
|
-
baseDirectory: __dirname
|
|
32
|
-
}).extends('plugin:codeceptjs/recommended')
|
|
33
|
-
|
|
34
|
-
export default [
|
|
35
|
-
...config,
|
|
36
|
-
{
|
|
37
|
-
files: ['**/*.js'],
|
|
38
|
-
plugins: {
|
|
39
|
-
...codeceptjs[1].plugins
|
|
40
|
-
},
|
|
41
|
-
rules: {
|
|
42
|
-
...codeceptjs[1].rules,
|
|
43
|
-
'no-unused-expressions': 0,
|
|
44
|
-
'import/no-absolute-path': 0,
|
|
45
|
-
'codeceptjs/no-skipped-tests': 'off',
|
|
46
|
-
'codeceptjs/no-pause-in-scenario': 'off'
|
|
47
|
-
},
|
|
48
|
-
languageOptions: {
|
|
49
|
-
globals: {
|
|
50
|
-
...codeceptjs[0].languageOptions.globals,
|
|
51
|
-
...mocha.configs.recommended.languageOptions.globals,
|
|
52
|
-
Feature: true,
|
|
53
|
-
Scenario: true,
|
|
54
|
-
Before: true,
|
|
55
|
-
After: true,
|
|
56
|
-
within: true,
|
|
57
|
-
assert: true,
|
|
58
|
-
locate: true,
|
|
59
|
-
session: true,
|
|
60
|
-
inject: true,
|
|
61
|
-
codecept_dir: true,
|
|
62
|
-
output_dir: true,
|
|
63
|
-
DataTable: true,
|
|
64
|
-
Data: true,
|
|
65
|
-
BeforeSuite: true,
|
|
66
|
-
AfterSuite: true,
|
|
67
|
-
actor: true,
|
|
68
|
-
expect: true,
|
|
69
|
-
require: true
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
]
|