@open-xchange/appsuite-codeceptjs 0.7.2 → 0.8.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,167 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.8.0] - 2026-03-15
8
+
9
+ ### Changed
10
+
11
+ - Replace chalk and dotenv with Node.js built-ins
12
+ - Clean up dependencies, packaging, and config files
13
+ - Clean up Chromium args and add renderer process limit
14
+
15
+ ## [0.7.2] - 2026-03-09
16
+
17
+ ### Added
18
+
19
+ - TypeScript type definitions
20
+
21
+ ## [0.7.0] - 2026-02-24
22
+
23
+ ### Changed
24
+
25
+ - Switch container base image to wolfi/playwright and make output directory configurable
26
+
27
+ ## [0.6.20] - 2026-02-24
28
+
29
+ ### Fixed
30
+
31
+ - Fix typo in import statement
32
+
33
+ ## [0.6.19] - 2026-02-24
34
+
35
+ ### Added
36
+
37
+ - Support for shared accounts in e2e tests
38
+
39
+ ## [0.6.18] - 2026-02-23
40
+
41
+ ### Changed
42
+
43
+ - Convert various step functions to sync
44
+
45
+ ## [0.6.17] - 2026-02-13
46
+
47
+ ### Added
48
+
49
+ - Helpers for manipulating user settings in tests
50
+ - Allow passing more custom steps to actor()
51
+
52
+ ### Fixed
53
+
54
+ - Internal Node exception when requiring appsuite-codeceptjs and chai (#18)
55
+
56
+ ## [0.6.16] - 2026-01-22
57
+
58
+ ### Added
59
+
60
+ - `e2e-context-` prefix check to prevent accidental context deletion
61
+ - Export "actor" from main module
62
+
63
+ ### Changed
64
+
65
+ - Use existing helper instead of creating new instance for every user
66
+
67
+ ### Fixed
68
+
69
+ - Location of "reporter" option inside "mocha" object
70
+ - Move `util.getURLRoot` call into actor
71
+
72
+ ### Removed
73
+
74
+ - Unnecessary default context fetch on module load
75
+
76
+ ## [0.6.14] - 2025-12-12
77
+
78
+ ### Changed
79
+
80
+ - Switch Playwright base image from jammy to noble
81
+
82
+ ## [0.6.13] - 2025-09-30
83
+
84
+ ### Fixed
85
+
86
+ - Unhandled rejection timeout errors in soap-client
87
+
88
+ ### Removed
89
+
90
+ - Unit tests (moved elsewhere)
91
+
92
+ ## [0.6.12] - 2025-09-25
93
+
94
+ ### Changed
95
+
96
+ - Use pageobjects package from core-ui
97
+
98
+ ## [0.6.10] - 2025-09-15
99
+
100
+ ### Fixed
101
+
102
+ - Use job group name as node-prefix for filter suite
103
+
104
+ ## [0.6.7] - 2025-07-18
105
+
106
+ ### Fixed
107
+
108
+ - Do not load common contexts when using reseller API
109
+
110
+ ## [0.6.4] - 2025-06-13
111
+
112
+ ### Changed
113
+
114
+ - Update pageobjects and actor to work with unpatched CodeceptJS
115
+
116
+ ## [0.6.3] - 2025-06-11
117
+
118
+ ### Added
119
+
120
+ - Documentation for overwriting helpers locally
121
+
122
+ ### Changed
123
+
124
+ - Move soap to own library
125
+ - Clean up codeceptjs dependencies
126
+ - Update paths for gitlab.com move
127
+
128
+ ### Fixed
129
+
130
+ - Setting startDate and endDate in calendar/createAppointment
131
+ - getNextMonday (pageobjects/calendar) to work on Sunday correctly
132
+
133
+ ### Removed
134
+
135
+ - chai-subset (now merged with chai)
136
+
137
+ ## [0.6.2] - 2024-12-17
138
+
139
+ ### Changed
140
+
141
+ - Replace Jest with Vitest and improve test infrastructure
142
+ - Switch to neostandard library
143
+
144
+ ## [0.6.0] - 2024-10-10
145
+
146
+ ### Added
147
+
148
+ - allure-js-commons module
149
+
150
+ ## [0.5.0] - 2024-09-30
151
+
152
+ ### Added
153
+
154
+ - E2E setup and testing for appsuite-codeceptjs
155
+ - Container image
156
+
157
+ ## [0.4.4] - 2024-08-27
158
+
159
+ ### Fixed
160
+
161
+ - Reseller API support for pre-assembled contexts
162
+
163
+ ## [0.4.3] - 2024-08-22
164
+
165
+ ### Added
166
+
167
+ - Initial release
package/README.md CHANGED
@@ -55,18 +55,4 @@ const { config } = require('@open-xchange/appsuite-codeceptjs')
55
55
  config.tests = './costum_directory/*_test.js'
56
56
 
57
57
  module.exports.config = config
58
- ```
59
-
60
- ## Known Issues
61
-
62
- Add this to your `package.json` to ignore CVE-2025-5889 when installing this package with `pnpm`:
63
-
64
- ```
65
- "pnpm": {
66
- "auditConfig": {
67
- "ignoreCves": [
68
- "CVE-2025-5889"
69
- ]
70
- }
71
- }
72
- ```
58
+ ```
package/index.js CHANGED
@@ -22,8 +22,9 @@ require('./src/chai')
22
22
  const { recorder, event: codeceptEvents } = require('codeceptjs')
23
23
  const pageobjects = require('@open-xchange/appsuite-codeceptjs-pageobjects')
24
24
 
25
- const dotenv = require('dotenv')
26
- dotenv.config({ path: ['.env', '.env.defaults'], quiet: true })
25
+ for (const envFile of ['.env', '.env.defaults']) {
26
+ try { process.loadEnvFile(envFile) } catch {}
27
+ }
27
28
 
28
29
  const outputDir = process.env.E2E_OUTPUT_DIR || './output'
29
30
 
@@ -52,20 +53,14 @@ module.exports = {
52
53
  browser: 'chromium',
53
54
  chromium: {
54
55
  args: [
55
- '--disable-print-preview',
56
- '--disable-crash-reporter',
57
- '--disable-dev-shm-usage',
58
- '--disable-features=IsolateOrigins',
59
56
  '--disable-gpu',
60
- '--disable-notifications', // to disable native notification window on Mac OS,
57
+ '--disable-notifications', // to disable native notification window on Mac OS
61
58
  '--disable-print-preview',
62
59
  '--disable-setuid-sandbox',
63
- '--disable-site-isolation-trials',
64
60
  '--disable-web-security',
65
- '--no-first-run',
66
- '--no-sandbox',
67
- '--no-zygote'
68
- ].concat((process.env.CHROME_ARGS || '').split(' '))
61
+ '--no-zygote',
62
+ '--renderer-process-limit=1'
63
+ ].concat((process.env.CHROME_ARGS || '').split(' ').filter(Boolean))
69
64
  },
70
65
  url: process.env.LAUNCH_URL,
71
66
  show: process.env.HEADLESS === 'false',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xchange/appsuite-codeceptjs",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "OX App Suite CodeceptJS Configuration and Helpers",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -15,17 +15,14 @@
15
15
  "license": "AGPL-3.0-or-later",
16
16
  "private": false,
17
17
  "dependencies": {
18
- "@axe-core/playwright": "^4.11.0",
18
+ "@axe-core/playwright": "^4.11.1",
19
19
  "@codeceptjs/helper": "^2.0.4",
20
20
  "@influxdata/influxdb-client": "^1.35.0",
21
21
  "@open-xchange/appsuite-codeceptjs-pageobjects": "^1.1.1",
22
22
  "@playwright/test": "1.58.2",
23
23
  "allure-codeceptjs": "2.15.1",
24
- "chai": "^6.2.1",
25
- "chalk": "^4.1.2",
26
- "chalk-table": "^1.0.2",
24
+ "chai": "^6.2.2",
27
25
  "codeceptjs": "3.7.6",
28
- "dotenv": "^17.2.3",
29
26
  "mocha": "^11.7.5",
30
27
  "mocha-junit-reporter": "^2.2.1",
31
28
  "mocha-multi": "^1.1.7",
@@ -34,17 +31,14 @@
34
31
  "p-retry": "^7.1.1",
35
32
  "playwright-core": "1.58.2",
36
33
  "short-uuid": "^6.0.3",
37
- "@open-xchange/codecept-horizontal-scaler": "0.1.14",
38
- "@open-xchange/soap-client": "0.0.12"
34
+ "@open-xchange/codecept-horizontal-scaler": "0.1.15",
35
+ "@open-xchange/soap-client": "0.1.0"
39
36
  },
40
37
  "devDependencies": {
41
- "@types/node": "^24.10.3",
38
+ "@types/node": "^25.5.0",
42
39
  "ts-node": "^10.9.2",
43
40
  "typescript": "^5.9.3",
44
- "@open-xchange/lint": "0.2.1"
45
- },
46
- "resolutions": {
47
- "axios": ">1.12.0"
41
+ "@open-xchange/lint": "0.3.0"
48
42
  },
49
43
  "scripts": {
50
44
  "lint": "eslint ."
@@ -21,8 +21,7 @@
21
21
  const { InfluxDB, Point } = require('@influxdata/influxdb-client')
22
22
  const event = require('codeceptjs/lib/event')
23
23
  const recorder = require('codeceptjs/lib/recorder')
24
- const chalk = require('chalk')
25
- const chalkTable = require('chalk-table')
24
+ const { styleText } = require('node:util')
26
25
 
27
26
  function durationOf (test) {
28
27
  return test.steps.reduce((sum, step) => sum + (step.endTime - step.startTime), 0)
@@ -39,18 +38,16 @@ module.exports = function setupTestMetricsPlugin ({ url, org, token, defaultTags
39
38
  writePoint (p) { points.push(p) },
40
39
  flush () {
41
40
  if (!points.length) return
42
- const options = {
43
- columns: [
44
- { field: 'measurement', name: chalk.cyan('Measurement') },
45
- { field: 'metric', name: chalk.cyan('Metric') },
46
- { field: 'duration', name: chalk.green('Duration') },
47
- { field: 'transferSize', name: chalk.green('Transfer size') },
48
- { field: 'decodedBodySize', name: chalk.green('Dec. body size') },
49
- { field: 'cached', name: chalk.yellow('Cached') },
50
- { field: 'tags', name: chalk.cyan('Tags') }
51
- ]
52
- }
53
- console.log(chalkTable(options, points.filter(p => p.name !== 'testrun').map(p => {
41
+ const columns = [
42
+ { field: 'measurement', name: 'Measurement', color: 'cyan' },
43
+ { field: 'metric', name: 'Metric', color: 'cyan' },
44
+ { field: 'duration', name: 'Duration', color: 'green' },
45
+ { field: 'transferSize', name: 'Transfer size', color: 'green' },
46
+ { field: 'decodedBodySize', name: 'Dec. body size', color: 'green' },
47
+ { field: 'cached', name: 'Cached', color: 'yellow' },
48
+ { field: 'tags', name: 'Tags', color: 'cyan' }
49
+ ]
50
+ const rows = points.filter(p => p.name !== 'testrun').map(p => {
54
51
  const metric = p.tags.metric
55
52
  delete p.tags.metric
56
53
  const cached = p.tags.cached
@@ -65,7 +62,11 @@ module.exports = function setupTestMetricsPlugin ({ url, org, token, defaultTags
65
62
  row[field] = p.fields[field]
66
63
  }
67
64
  return row
68
- })))
65
+ })
66
+ const widths = columns.map(col => Math.max(col.name.length, ...rows.map(r => String(r[col.field] ?? '').length)))
67
+ const header = columns.map((col, i) => styleText(col.color, col.name.padEnd(widths[i]))).join(' ')
68
+ const lines = rows.map(row => columns.map((col, i) => String(row[col.field] ?? '').padEnd(widths[i])).join(' '))
69
+ console.log([header, ...lines].join('\n'))
69
70
  points.splice(0, points.length)
70
71
  },
71
72
  dispose () {
@@ -1,9 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(find:*)",
5
- "Bash(grep:*)",
6
- "Bash(npm view:*)"
7
- ]
8
- }
9
- }
package/.env.defaults DELETED
@@ -1,48 +0,0 @@
1
- # Default environment variables
2
- #
3
- # Do not edit this file, instead create a .env file in the root directory!
4
-
5
- # CONTEXT_ID only needs to be set for local development
6
- # CONTEXT_ID=
7
-
8
- # Admin credentials for e2e middleware
9
- # PROVISIONING_USER=
10
- # PROVISIONING_PASSWORD=
11
-
12
- # SMTP and IMAP server for e2e-tests
13
- SMTP_SERVER=main-asbox-postfix
14
- IMAP_SERVER=main-asbox-dovecot
15
-
16
- # Number of maximum retries of e2e-test runs and minimal successful e2e-test runs
17
- MIN_SUCCESS=1
18
- MAX_RERUNS=1
19
-
20
- # URL to the App Suite Middleware for e2e-provisioning via SOAP
21
- PROVISIONING_URL=https://appsuite-main.dev.oxui.de/
22
-
23
- # URL to the App Suite UI for e2e-tests
24
- LAUNCH_URL=https://core-ui-main.dev.oxui.de
25
-
26
- # MX domain for e2e-tests
27
- MX_DOMAIN=box.ox.io
28
-
29
- # API used for e2e user provisioning (common/reseller)
30
- PROVISIONING_API=common
31
-
32
- # Default timeout for all wait operations for e2e tests in ms
33
- WAIT_TIMEOUT=5000
34
-
35
- # Run test headless or in chrome (Must be true for CI)
36
- HEADLESS=true
37
-
38
- # Test metrics plugin configuration
39
- E2E_TEST_METRICS_CLIENT=
40
- E2E_TEST_METRICS_TOKEN=
41
-
42
- # Path to the chrome binary
43
- CHROME_BIN=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
44
-
45
- # See https://peter.sh/experiments/chromium-command-line-switches
46
- CHROME_ARGS=
47
- # CHROME_ARGS: '--disable-accelerated-2d-canvas --no-zygote --single-process'
48
- DOTENV_CONFIG_QUIET=true
@@ -1 +0,0 @@
1
- FROM registry.gitlab.com/openxchange/base-images/wolfi/playwright:1.58.2
@@ -1,14 +0,0 @@
1
- packages:
2
- - ../lint
3
- - ../soap-client
4
- - ../codecept-horizontal-scaler
5
-
6
- ignoredBuiltDependencies:
7
- - detox
8
-
9
- onlyBuiltDependencies:
10
- - dtrace-provider
11
- - unrs-resolver
12
-
13
- publicHoistPattern:
14
- - '*eslint*'