0.6.3 • Published 4 months ago

@open-xchange/appsuite-codeceptjs v0.6.3

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
gitlab
Last release
4 months ago

Open-Xchange App Suite: CodeceptJS

App Suite specific CodeceptJS tooling.

Custom Helpers

The file src/helpers.js contains App Suite specific CodeceptJS helpers. It is possible to overwrite any of these helpers or add new ones in projects that use this package. This might be useful for maintenance work on existing helpers or when developing new ones and can be achieved with the following changes:

// CodeceptJS configuration of a local package
// file: e2e/codecept.conf.js

const { config } = require('@open-xchange/appsuite-codeceptjs')

// import local helpers
config.helpers.AppSuite = {
  require: './helper'
}

module.exports.config = config
// Local helpers
// file: e2e/helper.js

const Helper = require('@open-xchange/appsuite-codeceptjs/src/helper')

class CustomHelper extends Helper {
  // This overwrites the existing `selectFolder` helper
  async selectFolder (locator) {
    locator = '.folder-tree ' + locator
    await this.helpers.Playwright.page.locator(locator).click()
  }

  // This creates the new helper `newCostumHelper`
  async newCostumHelper () {
    await this.helpers.Playwright.waitForVisible({ css: 'html.complete' }, 10)
  }
}

module.exports = CustomHelper

Local Configuration Overwrite

You can use the config object for local customization of the default CodeceptJS configuration provided by this package. For example you can change the tests directory the following way:

// CodeceptJS configuration of a local package
// file: e2e/codecept.conf.js

const { config } = require('@open-xchange/appsuite-codeceptjs')

config.tests = './costum_directory/*_test.js'

module.exports.config = config

Known Issues

Add this to your package.json to ignore CVE-2025-5889 when installing this package with pnpm:

"pnpm": {
  "auditConfig": {
    "ignoreCves": [
      "CVE-2025-5889"
    ]
  }
}