@open-xchange/appsuite-codeceptjs 0.6.12 → 0.6.14
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/container/Dockerfile +1 -1
- package/package.json +15 -16
- package/pnpm-workspace.yaml +13 -3
- package/src/contexts/contexts.js +6 -1
- package/spec/pageobjects/calendar.test.js +0 -123
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.57.0-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.14",
|
|
4
4
|
"description": "OX App Suite CodeceptJS Configuration and Helpers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -14,39 +14,38 @@
|
|
|
14
14
|
"license": "AGPL-3.0-or-later",
|
|
15
15
|
"private": false,
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@axe-core/playwright": "^4.
|
|
17
|
+
"@axe-core/playwright": "^4.11.0",
|
|
18
18
|
"@codeceptjs/helper": "^2.0.4",
|
|
19
19
|
"@influxdata/influxdb-client": "^1.35.0",
|
|
20
|
-
"@open-xchange/appsuite-codeceptjs-pageobjects": "^1.
|
|
21
|
-
"@playwright/test": "1.
|
|
20
|
+
"@open-xchange/appsuite-codeceptjs-pageobjects": "^1.1.0",
|
|
21
|
+
"@playwright/test": "1.57.0",
|
|
22
22
|
"allure-codeceptjs": "2.15.1",
|
|
23
|
-
"chai": "^6.
|
|
23
|
+
"chai": "^6.2.1",
|
|
24
24
|
"chalk": "^4.1.2",
|
|
25
25
|
"chalk-table": "^1.0.2",
|
|
26
26
|
"codeceptjs": "3.7.5",
|
|
27
|
-
"dotenv": "^17.2.
|
|
28
|
-
"mocha": "^11.7.
|
|
27
|
+
"dotenv": "^17.2.3",
|
|
28
|
+
"mocha": "^11.7.5",
|
|
29
29
|
"mocha-junit-reporter": "^2.2.1",
|
|
30
30
|
"mocha-multi": "^1.1.7",
|
|
31
31
|
"moment": "^2.30.1",
|
|
32
32
|
"moment-timezone": "^0.6.0",
|
|
33
|
-
"p-retry": "^7.
|
|
34
|
-
"playwright-core": "1.
|
|
35
|
-
"short-uuid": "^
|
|
36
|
-
"@open-xchange/
|
|
37
|
-
"@open-xchange/
|
|
33
|
+
"p-retry": "^7.1.1",
|
|
34
|
+
"playwright-core": "1.57.0",
|
|
35
|
+
"short-uuid": "^6.0.3",
|
|
36
|
+
"@open-xchange/soap-client": "0.0.8",
|
|
37
|
+
"@open-xchange/codecept-horizontal-scaler": "0.1.13"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@types/node": "^24.3
|
|
40
|
+
"@types/node": "^24.10.3",
|
|
41
41
|
"ts-node": "^10.9.2",
|
|
42
|
-
"typescript": "^5.9.
|
|
42
|
+
"typescript": "^5.9.3",
|
|
43
43
|
"@open-xchange/lint": "0.2.0"
|
|
44
44
|
},
|
|
45
45
|
"resolutions": {
|
|
46
46
|
"axios": ">1.12.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
|
-
"lint": "eslint ."
|
|
50
|
-
"test": "mocha --color 'spec/**/*.test.js'"
|
|
49
|
+
"lint": "eslint ."
|
|
51
50
|
}
|
|
52
51
|
}
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
packages:
|
|
2
|
-
-
|
|
3
|
-
-
|
|
4
|
-
-
|
|
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*'
|
package/src/contexts/contexts.js
CHANGED
|
@@ -26,6 +26,12 @@ const { contextService, getFilestorageId } = require('@open-xchange/soap-client/
|
|
|
26
26
|
const crypto = require('node:crypto')
|
|
27
27
|
const codecept = require('codeceptjs')
|
|
28
28
|
|
|
29
|
+
let defaultContext
|
|
30
|
+
;(async () => {
|
|
31
|
+
console.log('Fetching default context')
|
|
32
|
+
defaultContext = await contextService.getDefault()
|
|
33
|
+
})()
|
|
34
|
+
|
|
29
35
|
class Context {
|
|
30
36
|
constructor ({ ctxdata, admin, auth }) {
|
|
31
37
|
this.id = ctxdata.id
|
|
@@ -41,7 +47,6 @@ class Context {
|
|
|
41
47
|
}
|
|
42
48
|
|
|
43
49
|
async remove () {
|
|
44
|
-
const defaultContext = await contextService.getDefault()
|
|
45
50
|
// do not remove default context
|
|
46
51
|
if (defaultContext !== undefined && this.ctxdata.id === defaultContext.id) throw new Error('Cannot remove default context')
|
|
47
52
|
try {
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
const { expect } = require('chai')
|
|
2
|
-
const { getMonday } = require('../../src/pageobjects/util')
|
|
3
|
-
const moment = require('moment')
|
|
4
|
-
|
|
5
|
-
const FORMAT = 'YYYY-MM-DD'
|
|
6
|
-
|
|
7
|
-
describe('Calendar', function () {
|
|
8
|
-
describe('getMonday()', function () {
|
|
9
|
-
describe('Week starts on Monday (locale=de)', function () {
|
|
10
|
-
it('should see the week starting on Monday (1)', function () {
|
|
11
|
-
expect(moment.localeData('de').firstDayOfWeek()).to.equal(1)
|
|
12
|
-
})
|
|
13
|
-
it('should return 2025-06-02 on 2025-06-06 (last Friday)', function () {
|
|
14
|
-
const date = moment('2025-06-06').locale('de')
|
|
15
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-02')
|
|
16
|
-
})
|
|
17
|
-
it('should return 2025-06-02 on 2025-06-07 (Saturday)', function () {
|
|
18
|
-
const date = moment('2025-06-07').locale('de')
|
|
19
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-02')
|
|
20
|
-
})
|
|
21
|
-
it('should return 2025-06-02 on 2025-06-08 (Sunday)', function () {
|
|
22
|
-
const date = moment('2025-06-08').locale('de')
|
|
23
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-02')
|
|
24
|
-
})
|
|
25
|
-
it('should return 2025-06-09 on 2025-06-09 (Monday)', function () {
|
|
26
|
-
const date = moment('2025-06-09').locale('de')
|
|
27
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
28
|
-
})
|
|
29
|
-
it('should return 2025-06-13 on 2025-06-09 (Friday)', function () {
|
|
30
|
-
const date = moment('2025-06-13').locale('de')
|
|
31
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
32
|
-
})
|
|
33
|
-
it('should return 2025-06-02 on 2025-06-14 (next Saturday)', function () {
|
|
34
|
-
const date = moment('2025-06-14').locale('de')
|
|
35
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
36
|
-
})
|
|
37
|
-
it('should return 2025-06-02 on 2025-06-15 (next Sunday)', function () {
|
|
38
|
-
const date = moment('2025-06-15').locale('de')
|
|
39
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
40
|
-
})
|
|
41
|
-
it('should return 2025-06-02 on 2025-06-16 (next Monday)', function () {
|
|
42
|
-
const date = moment('2025-06-16').locale('de')
|
|
43
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-16')
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
describe('Week starts on Sunday (locale=en)', function () {
|
|
48
|
-
it('should see the week starting on Sunday (0)', function () {
|
|
49
|
-
expect(moment.localeData('en').firstDayOfWeek()).to.equal(0)
|
|
50
|
-
})
|
|
51
|
-
it('should return 2025-06-02 on 2025-06-06 (last Friday)', function () {
|
|
52
|
-
const date = moment('2025-06-06').locale('en')
|
|
53
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-02')
|
|
54
|
-
})
|
|
55
|
-
it('should return 2025-06-02 on 2025-06-07 (Saturday)', function () {
|
|
56
|
-
const date = moment('2025-06-07').locale('en')
|
|
57
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-02')
|
|
58
|
-
})
|
|
59
|
-
it('should return 2025-06-09 on 2025-06-08 (Sunday)', function () {
|
|
60
|
-
const date = moment('2025-06-08').locale('en')
|
|
61
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
62
|
-
})
|
|
63
|
-
it('should return 2025-06-09 on 2025-06-09 (Monday)', function () {
|
|
64
|
-
const date = moment('2025-06-09').locale('en')
|
|
65
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
66
|
-
})
|
|
67
|
-
it('should return 2025-06-13 on 2025-06-09 (Friday)', function () {
|
|
68
|
-
const date = moment('2025-06-13').locale('en')
|
|
69
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
70
|
-
})
|
|
71
|
-
it('should return 2025-06-02 on 2025-06-14 (next Saturday)', function () {
|
|
72
|
-
const date = moment('2025-06-14').locale('en')
|
|
73
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
74
|
-
})
|
|
75
|
-
it('should return 2025-06-02 on 2025-06-15 (next Sunday)', function () {
|
|
76
|
-
const date = moment('2025-06-15').locale('en')
|
|
77
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-16')
|
|
78
|
-
})
|
|
79
|
-
it('should return 2025-06-02 on 2025-06-16 (next Monday)', function () {
|
|
80
|
-
const date = moment('2025-06-16').locale('en')
|
|
81
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-16')
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
describe('Week starts on Saturday (locale=tzm-latn)', function () {
|
|
86
|
-
it('should see the week starting on Saturday (6)', function () {
|
|
87
|
-
expect(moment.localeData('tzm-latn').firstDayOfWeek()).to.equal(6)
|
|
88
|
-
})
|
|
89
|
-
it('should return 2025-06-02 on 2025-06-06 (last Friday)', function () {
|
|
90
|
-
const date = moment('2025-06-06').locale('tzm-latn')
|
|
91
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-02')
|
|
92
|
-
})
|
|
93
|
-
it('should return 2025-06-09 on 2025-06-07 (Saturday)', function () {
|
|
94
|
-
const date = moment('2025-06-07').locale('tzm-latn')
|
|
95
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
96
|
-
})
|
|
97
|
-
it('should return 2025-06-09 on 2025-06-08 (Sunday)', function () {
|
|
98
|
-
const date = moment('2025-06-08').locale('tzm-latn')
|
|
99
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
100
|
-
})
|
|
101
|
-
it('should return 2025-06-09 on 2025-06-09 (Monday)', function () {
|
|
102
|
-
const date = moment('2025-06-09').locale('tzm-latn')
|
|
103
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
104
|
-
})
|
|
105
|
-
it('should return 2025-06-13 on 2025-06-09 (Friday)', function () {
|
|
106
|
-
const date = moment('2025-06-13').locale('tzm-latn')
|
|
107
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-09')
|
|
108
|
-
})
|
|
109
|
-
it('should return 2025-06-02 on 2025-06-14 (next Saturday)', function () {
|
|
110
|
-
const date = moment('2025-06-14').locale('tzm-latn')
|
|
111
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-16')
|
|
112
|
-
})
|
|
113
|
-
it('should return 2025-06-02 on 2025-06-15 (next Sunday)', function () {
|
|
114
|
-
const date = moment('2025-06-15').locale('tzm-latn')
|
|
115
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-16')
|
|
116
|
-
})
|
|
117
|
-
it('should return 2025-06-02 on 2025-06-16 (next Monday)', function () {
|
|
118
|
-
const date = moment('2025-06-16').locale('tzm-latn')
|
|
119
|
-
expect(getMonday(date).format(FORMAT)).to.equal('2025-06-16')
|
|
120
|
-
})
|
|
121
|
-
})
|
|
122
|
-
})
|
|
123
|
-
})
|