@open-xchange/appsuite-codeceptjs 0.4.4 → 0.6.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.
@@ -0,0 +1 @@
1
+ FROM registry.gitlab.open-xchange.com/appsuite/web-foundation/base-images/playwright:v1.48.1-jammy
@@ -0,0 +1,73 @@
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.flat.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
+ ]
package/index.js CHANGED
@@ -18,7 +18,7 @@
18
18
  * Any use of the work other than as authorized under this license or copyright law is prohibited.
19
19
  */
20
20
 
21
- require('@open-xchange/appsuite-codeceptjs/src/chai')
21
+ require('./src/chai')
22
22
  const dotenv = require('dotenv')
23
23
  dotenv.config({ path: '.env' })
24
24
  dotenv.config({ path: '.env.defaults' })
@@ -124,9 +124,9 @@ module.exports = {
124
124
  async teardown () {
125
125
  const { contexts } = global.inject()
126
126
  // we need to run this sequentially, less stress on the MW
127
- const filterFunction = process.env.PROVISIONING_API === 'reseller' ?
128
- ctx => ctx.name.includes('e2e_context') :
129
- ctx => /e2e-context-/.test(String(ctx.loginMappings))
127
+ const filterFunction = process.env.PROVISIONING_API === 'reseller'
128
+ ? ctx => ctx.name.includes('e2e_context')
129
+ : ctx => /e2e-context-/.test(String(ctx.loginMappings))
130
130
  for (const ctx of contexts.filter(filterFunction)) {
131
131
  await ctx.remove().catch(e => console.error(e.message))
132
132
  }
@@ -173,6 +173,7 @@ module.exports = {
173
173
  require: '@open-xchange/appsuite-codeceptjs/src/plugins/settingsInit',
174
174
  enabled: true
175
175
  },
176
+
176
177
  customizePlugin: {
177
178
  require: process.env.CUSTOMIZE_PLUGIN || '@open-xchange/appsuite-codeceptjs/src/plugins/emptyModule',
178
179
  enabled: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-xchange/appsuite-codeceptjs",
3
- "version": "0.4.4",
3
+ "version": "0.6.0",
4
4
  "description": "OX App Suite CodeceptJS Configuration and Helpers",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -10,31 +10,36 @@
10
10
  "license": "AGPL-3.0-or-later",
11
11
  "private": false,
12
12
  "dependencies": {
13
- "@axe-core/playwright": "^4.9.1",
13
+ "@axe-core/playwright": "^4.10.0",
14
14
  "@codeceptjs/helper": "^2.0.4",
15
- "@influxdata/influxdb-client": "^1.33.2",
15
+ "@influxdata/influxdb-client": "^1.35.0",
16
16
  "@open-xchange/codecept-horizontal-scaler": "^0.1.11",
17
- "@playwright/test": "1.46.1",
18
- "allure-codeceptjs": "^2.15.1",
17
+ "@playwright/test": "1.48.1",
18
+ "allure-codeceptjs": "^3.0.3",
19
+ "allure-js-commons": "^3.0.3",
19
20
  "chai": "^5.1.1",
20
21
  "chai-subset": "^1.6.0",
21
- "chalk": "^4.1.0",
22
+ "chalk": "^4.1.2",
22
23
  "chalk-table": "^1.0.2",
23
- "codeceptjs": "3.6.5",
24
+ "codeceptjs": "3.6.7",
24
25
  "dotenv": "^16.4.5",
25
- "mocha": "^10.4.0",
26
+ "mocha": "^10.7.3",
26
27
  "mocha-junit-reporter": "^2.2.1",
27
28
  "mocha-multi": "^1.1.7",
28
29
  "moment": "^2.30.1",
29
30
  "moment-timezone": "^0.5.45",
30
31
  "p-retry": "^6.2.0",
31
- "playwright-core": "1.46.1",
32
+ "playwright-core": "1.48.1",
32
33
  "short-uuid": "^5.2.0",
33
- "soap": "^1.0.3"
34
+ "soap": "^1.1.5"
34
35
  },
35
36
  "devDependencies": {
36
- "@types/node": "^22.4.1",
37
+ "@types/node": "^22.7.4",
37
38
  "ts-node": "^10.9.2",
38
- "typescript": "^5.4.5"
39
+ "typescript": "^5.6.2",
40
+ "@open-xchange/lint": "0.1.5"
41
+ },
42
+ "scripts": {
43
+ "lint": "eslint ."
39
44
  }
40
45
  }
@@ -87,7 +87,6 @@ module.exports = {
87
87
 
88
88
  async hasImage () {
89
89
  const rule = await I.grabCssPropertyFrom('.contact-header .contact-photo', 'background-image')
90
- expect(rule).not.to.match(/fallback/)
91
90
  expect(rule).to.match(/^url\(/)
92
91
  },
93
92
 
@@ -20,7 +20,6 @@
20
20
 
21
21
  const { createClientAsync } = require('../soap.js')
22
22
 
23
-
24
23
  /**
25
24
  * This function retrieves the ID of the first filestorage.
26
25
  * @returns {Promise<number>} The ID of the first filestorage.
@@ -28,7 +27,7 @@ const { createClientAsync } = require('../soap.js')
28
27
  let fileStoreId
29
28
 
30
29
  async function getFilestorageId () {
31
- const OXUtilService = createClientAsync('OXUtilService').then(client => client)
30
+ const OXUtilService = createClientAsync('OXUtilService').then(client => client)
32
31
 
33
32
  if (fileStoreId) return fileStoreId
34
33
  fileStoreId = (await (await OXUtilService).listFilestoreAsync())[0]?.id