# Changelog

All notable changes to this project will be documented in this file.

## [Unreleased]

## [0.14.0] - 2026-06-25

### Added

- Opt-in pool provisioning mode (`PROVISIONING_MODE=pool`): `users.create()`
  hands out pre-seeded pool users instead of SOAP-creating them. Default
  behavior (SOAP) is unchanged. See the e2e-environments repo,
  docs/test-provisioning/2026-06-11-pool-seeder-v1.5-ci-hookup-design.md.

## [0.13.3] - 2026-06-03

### Fixed

- Lazy-load the Playwright helper for the macOS Home/End keymap patch via `import().then(...)` instead of a top-level `await import()`. The top-level await made `index.js` an async module, which some downstream TypeScript transpilers (targeting a module format without top-level-await support) could not handle, breaking config loading. The patch is still applied the same way, just outside the synchronous module-evaluation path.

## [0.13.2] - 2026-06-01

### Fixed

- `I.haveMail()` now accepts shared accounts for `from`/`to`/`cc` (types only). `MailAddresses` was widened to include `SharedAccount` (single or in the array form), and `UserData`/`SharedAccountData` were refactored onto a shared `CommonAccountData` base interface. The runtime already handled shared accounts; only the TypeScript types rejected them.

### Changed

- Bump `@open-xchange/appsuite-codeceptjs-pageobjects` from `^1.2.0` to `^1.3.0` and `codeceptjs` from `^4.0.2` to `^4.0.3`.

## [0.13.1] - 2026-05-28

### Changed

- Bump `@open-xchange/appsuite-codeceptjs-pageobjects` from `^1.1.1` to `^1.2.0`. 1.2.0 ships the ESM-with-explicit-imports build upstream, which removes the need for the pnpm `patchedDependencies` workaround the e2e workspace carried against the published 1.1.1 (added `require('codeceptjs').locate` so the CJS build worked under codeceptjs 4's `noGlobals`).

## [0.13.0] - 2026-05-28

### Changed

- Bump `@open-xchange/codecept-horizontal-scaler` from `0.2.1` to `0.3.0`. The scaler now uses Longest-Processing-Time (LPT) bin packing for partitioning instead of the previous sequential fill-and-overflow approach, and round-robins known-skipped tests (suite-service `state: 'skipped'` / `'active skipped'`) across all CI shards. The old behaviour packed clusters of cheap-duration tests onto whichever shard happened to be "current", and skipped tests' 10s placeholder duration let ~20 of them pack right under one bucket's budget — leaving that shard idle for the whole pipeline (observed on web-apps MR 6560: one shard ran 19 skipped tests in 20s while the rest of the fleet ran 4–6 minutes). The new algorithm balances time across all buckets independently of input order and spreads skipped tests one-per-partition by count.

## [0.12.0] - 2026-05-28

### Added

- Restore Allure reporting via `allure-codeceptjs@^3.9.0`. CodeceptJS 4 dropped the built-in `allure` plugin; the 3.x adapter from `allure-framework/allure-js` is now wired in as `plugins.allure`, writing raw results into `${outputDir}/allure-results`. Replaces the 2.15.1 adapter removed in 0.11.0 that crashed on `test.failed` events.
- `allureScreenshot` plugin: bridges CodeceptJS 4's screenshot artifact into the allure report. CC4's built-in `screenshot` plugin no longer calls the allure adapter's `addAttachment` shim, so failure PNGs were landing on disk but never appearing in the report. The bridge subscribes to `test.failed`, queues onto the recorder so it runs after the screenshot is saved, and calls `attachmentPath()` from `allure-js-commons`. Best-effort: attachment errors are swallowed.
- Lift the macOS Home/End keymap patch (translates `End` → `CommandOrControl+ArrowRight`, `Home` → `CommandOrControl+ArrowLeft` via `Playwright.prototype.pressKey`) into the base config. Previously had to be duplicated in every downstream `codecept.conf.js`. Set `OX_SKIP_MACOS_KEYMAP=1` to opt out. Linux is left untouched. The `__oxOsKeyMapPatched` guard makes the patch idempotent, so downstream copies that haven't been removed yet will no-op rather than double-apply during the rollout window.

## [0.11.0] - 2026-05-27

### Changed

- **BREAKING:** Remove the `allure-codeceptjs` reporter dependency. The pinned 2.15.1 release crashes on CodeceptJS 4's `test.failed` events with `stripAscii: str.replace is not a function`, dropping failed-test entries entirely. Consumers that relied on Allure should pick this up in 0.12.0 (which wires the 3.x adapter back in); the `junitReporter` plugin remains for CI reporting.
- Bump `codeceptjs` floor from `^4.0.0` to `^4.0.2`.

### Fixed

- Run `e2e-rerun` attempts as isolated `codeceptjs run` subprocesses instead of an in-process loop. The previous in-process implementation orphaned a browser process tree on every rerun (measured: browser root processes 2→3→4→5 over 4 reruns, ~1.3GB RSS) and hit CI OOMKill (exit 137) on long runs. Process exit now reaps every browser unconditionally; per-shard memory stays flat (~875MB sawtooth). Each attempt's junit is merged into one final report so flaky-recovered tests count as passes and persistent failures as fails. Adds `@xmldom/xmldom` for junit parsing.

## [0.10.0] - 2026-05-26

### Changed

- **BREAKING:** Require CodeceptJS `^4.0.0`. The package no longer runs under CodeceptJS 3.
- **BREAKING:** Convert package to ESM (`"type": "module"`). The source is now `import`/`export`; consumers that previously did `require('@open-xchange/appsuite-codeceptjs')` need to switch to `import` (or dynamic `import()`).
- Enable `noGlobals: true` in the shared config. CodeceptJS 4 keeps `Feature`, `Scenario`, `Before`, `After`, `BeforeSuite`, `AfterSuite`, `pause`, `inject`, `share` available in test files without imports; everything else (`Helper`, `within`, `session`, `secret`, `locate`, `dataTable`, `actor`, …) must be imported from `codeceptjs` now.
- Reporter setup: replace the `mocha-multi` + `mocha-junit-reporter` combination (CJS-only, breaks under codeceptjs 4's ESM loader) with the built-in `junitReporter` plugin alongside the default CLI reporter.
- `customRerun.js` aligned with `lib/command/run.js` / `run-rerun.js`:
  - Adds `autoExit()` at the end of the entrypoint so the process force-exits after tests; without this, lingering helper handles (Playwright, axios keepalive, …) kept the event loop alive indefinitely after a successful run.
  - `teardown()` moved into the entrypoint's `finally` so it runs even when the test run throws.
  - `createOutputDir(config, testRoot)` and `getTestRoot()` now wired in so output paths exist before reporters write into them.
- Bumped peer/runtime deps (codeceptjs, playwright, chai, typescript, …) and dropped `ts-node`, `mocha-junit-reporter`, `mocha-multi` from dependencies.

### Fixed

- `customRerun` now fires mocha's `pre-require` event on the freshly-built mocha before importing each test file. Without this, ESM test files loaded via the rerun loop crashed with `ReferenceError: Feature is not defined` under `noGlobals: true` because nothing had wired the BDD context onto the file scope.
- `customRerun` awaits `Codecept.init()` so async helpers finish wiring before the first `I.*` call.
- `customRerun.runOnce()` emits `event.all.before` / `event.all.result` per iteration (not once per process). Plugins that maintain per-iteration state — most importantly the horizontal-scaler partitioner — now see consistent `before` / `result` events for every rerun, fixing the `this.suite undefined` crash in `postDurations()` after a single iteration completes.
- `customRerun.runOnce()` awaits `container.started()` so async helpers are fully wired before the first `I.*` call.
- `e2e-rerun` bin: `await Codecept.init()` is now awaited so async helpers finish wiring before tests start.
- `haveMailAccount` / `waitForCapability` no longer reference the codeceptjs `session` global in their `params` shorthand — that reference resolved to a function object that the HTTP interceptor immediately overwrote with the real OX session id anyway, so the cleanup has no behavior change but removes a deprecated-globals warning.

## [0.9.8] - 2026-05-21

### Fixed

- `fetchWithRetry` surfaces HTTP errors with status + body instead of returning failed responses as success
- `fetchWithRetry` fails fast on 4xx and `200 + data.error` instead of burning retries on non-retryable failures
- `saveSetting` validates the `/api/jslob` response shape with a descriptive error
- `PropagatedError` preserves SOAP fault fields (`faultstring`, `faultcode`, `detail`, `root`, `code`, `response`, `body`) from wrapped errors instead of dropping everything but `.message`
- `PropagatedError` undefined-input guard runs before `super()` so it throws the intended `"PropagateError needs an error"` instead of a generic `TypeError`

## [0.9.7] - 2026-05-13

### Fixed

- Add missing properties to `SharedAccountData` interface

## [0.9.6] - 2026-05-12

### Added

- `I.haveFolder()` resolves the default parent folder when none is provided
- Re-export codeceptjs `container` singleton from main module

### Fixed

- Add missing type definitions
- Drop unsupported `mailenabled` parameter for shared accounts

## [0.9.5] - 2026-04-29

### Fixed

- `I.haveMail()` must accept a single string for `from`, `to`, and `cc`

## [0.9.4] - 2026-04-28

### Added

- `I.verifyAxeReport(options)` step for accessibility checks
- Optional `folder` parameter for `I.haveFile`, `I.haveContact`, and `I.haveTask`
- `I.haveMail()` accepts a single user for `from`/`to` and a list of users for `cc`

### Changed

- Clean up config files, remove unused `steps.d.ts`, update `testing.md`

### Fixed

- Correct name of user property `display_name` in `I.haveMail()`

## [0.9.3] - 2026-04-21

### Added

- `SharedAccount.convertFromUser` to convert an existing user to a shared account
- `SharedAccount.removeAll` to remove all registered shared accounts

## [0.9.0] - 2026-04-06

### Changed

- Replace custom testMetrics plugin (InfluxDB) with @open-xchange/codeceptjs-hindsight

### Removed

- `@influxdata/influxdb-client` dependency
- Custom `src/plugins/testmetrics` plugin

## [0.8.1] - 2026-03-26

### Added

- TypeScript type fixes and additions (chai globals)
- Emit events for shared accounts

### Fixed

- Include TypeScript test files in build

## [0.8.0] - 2026-03-15

### Changed

- Replace chalk and dotenv with Node.js built-ins
- Clean up dependencies, packaging, and config files
- Clean up Chromium args and add renderer process limit

## [0.7.2] - 2026-03-09

### Added

- TypeScript type definitions

## [0.7.0] - 2026-02-24

### Changed

- Switch container base image to wolfi/playwright and make output directory configurable

## [0.6.20] - 2026-02-24

### Fixed

- Fix typo in import statement

## [0.6.19] - 2026-02-24

### Added

- Support for shared accounts in e2e tests

## [0.6.18] - 2026-02-23

### Changed

- Convert various step functions to sync

## [0.6.17] - 2026-02-13

### Added

- Helpers for manipulating user settings in tests
- Allow passing more custom steps to actor()

### Fixed

- Internal Node exception when requiring appsuite-codeceptjs and chai (#18)

## [0.6.16] - 2026-01-22

### Added

- `e2e-context-` prefix check to prevent accidental context deletion
- Export "actor" from main module

### Changed

- Use existing helper instead of creating new instance for every user

### Fixed

- Location of "reporter" option inside "mocha" object
- Move `util.getURLRoot` call into actor

### Removed

- Unnecessary default context fetch on module load

## 0.6.14 - 2025-12-12

### Changed

- Switch Playwright base image from jammy to noble

## [0.6.13] - 2025-09-30

### Fixed

- Unhandled rejection timeout errors in soap-client

### Removed

- Unit tests (moved elsewhere)

## [0.6.12] - 2025-09-25

### Changed

- Use pageobjects package from core-ui

## [0.6.10] - 2025-09-15

### Fixed

- Use job group name as node-prefix for filter suite

## [0.6.7] - 2025-07-18

### Fixed

- Do not load common contexts when using reseller API

## [0.6.4] - 2025-06-13

### Changed

- Update pageobjects and actor to work with unpatched CodeceptJS

## [0.6.3] - 2025-06-11

### Added

- Documentation for overwriting helpers locally

### Changed

- Move soap to own library
- Clean up codeceptjs dependencies
- Update paths for gitlab.com move

### Fixed

- Setting startDate and endDate in calendar/createAppointment
- getNextMonday (pageobjects/calendar) to work on Sunday correctly

### Removed

- chai-subset (now merged with chai)

## [0.6.2] - 2024-12-17

### Changed

- Replace Jest with Vitest and improve test infrastructure
- Switch to neostandard library

## [0.6.0] - 2024-10-10

### Added

- allure-js-commons module

## [0.5.0] - 2024-09-30

### Added

- E2E setup and testing for appsuite-codeceptjs
- Container image

## [0.4.4] - 2024-08-27

### Fixed

- Reseller API support for pre-assembled contexts

## [0.4.3] - 2024-08-22

### Added

- Initial release

[unreleased]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.14.0...main
[0.14.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.13.3...appsuite-codeceptjs-0.14.0
[0.13.3]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.13.2...appsuite-codeceptjs-0.13.3
[0.13.2]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.13.1...appsuite-codeceptjs-0.13.2
[0.13.1]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.13.0...appsuite-codeceptjs-0.13.1
[0.13.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.12.0...appsuite-codeceptjs-0.13.0
[0.12.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.11.0...appsuite-codeceptjs-0.12.0
[0.11.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.10.0...appsuite-codeceptjs-0.11.0
[0.10.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.9.8...appsuite-codeceptjs-0.10.0
[0.9.8]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.9.7...appsuite-codeceptjs-0.9.8
[0.9.7]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.9.6...appsuite-codeceptjs-0.9.7
[0.9.6]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.9.5...appsuite-codeceptjs-0.9.6
[0.9.5]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.9.4...appsuite-codeceptjs-0.9.5
[0.9.4]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.9.3...appsuite-codeceptjs-0.9.4
[0.9.3]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.9.2...appsuite-codeceptjs-0.9.3
[0.9.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.8.1...appsuite-codeceptjs-0.9.0
[0.8.1]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.8.0...appsuite-codeceptjs-0.8.1
[0.8.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.7.2...appsuite-codeceptjs-0.8.0
[0.7.2]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.7.1...appsuite-codeceptjs-0.7.2
[0.7.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.20...appsuite-codeceptjs-0.7.0
[0.6.20]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.19...appsuite-codeceptjs-0.6.20
[0.6.19]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.18...appsuite-codeceptjs-0.6.19
[0.6.18]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.17...appsuite-codeceptjs-0.6.18
[0.6.17]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.16...appsuite-codeceptjs-0.6.17
[0.6.16]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.15...appsuite-codeceptjs-0.6.16
[0.6.13]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.12...appsuite-codeceptjs-0.6.13
[0.6.12]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.11...appsuite-codeceptjs-0.6.12
[0.6.10]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.9...appsuite-codeceptjs-0.6.10
[0.6.7]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.6...appsuite-codeceptjs-0.6.7
[0.6.4]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.3...appsuite-codeceptjs-0.6.4
[0.6.3]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.2...appsuite-codeceptjs-0.6.3
[0.6.2]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.6.1...appsuite-codeceptjs-0.6.2
[0.6.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.5.0...appsuite-codeceptjs-0.6.0
[0.5.0]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.4.4...appsuite-codeceptjs-0.5.0
[0.4.4]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/compare/appsuite-codeceptjs-0.4.3...appsuite-codeceptjs-0.4.4
[0.4.3]: https://gitlab.com/openxchange/appsuite/web-foundation/tools/-/tags/appsuite-codeceptjs-0.4.3
