@open-xchange/appsuite-codeceptjs 0.6.12 → 0.6.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xchange/appsuite-codeceptjs",
3
- "version": "0.6.12",
3
+ "version": "0.6.13",
4
4
  "description": "OX App Suite CodeceptJS Configuration and Helpers",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -33,8 +33,8 @@
33
33
  "p-retry": "^7.0.0",
34
34
  "playwright-core": "1.55.1",
35
35
  "short-uuid": "^5.2.0",
36
- "@open-xchange/codecept-horizontal-scaler": "0.1.13",
37
- "@open-xchange/soap-client": "0.0.7"
36
+ "@open-xchange/soap-client": "0.0.8",
37
+ "@open-xchange/codecept-horizontal-scaler": "0.1.13"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^24.3.0",
@@ -46,7 +46,6 @@
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
  }
@@ -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
- })