From 92527059cfc4d47c7b85daff39ed846ca1b6d052 Mon Sep 17 00:00:00 2001 From: Denys Kuchma Date: Thu, 17 Sep 2026 17:24:26 +0200 Subject: [PATCH 1/2] docs: prepare Obscura and Node.js 22 for 4.2 --- .github/workflows/appium_Android.yml | 2 +- .github/workflows/appium_iOS.yml | 2 +- .github/workflows/doc-generation.yml | 2 +- .github/workflows/dtslint.yml | 2 +- .github/workflows/obscura.yml | 2 +- .github/workflows/playwright.yml | 2 +- .github/workflows/plugin.yml | 2 +- .github/workflows/puppeteer.yml | 2 +- .github/workflows/sharding-demo.yml | 2 +- .github/workflows/test.yml | 4 ++-- .github/workflows/webdriver.yml | 2 +- README.md | 4 +++- docs/alternative-browsers.md | 25 ++++++++++++-------- docs/continuous-integration.md | 28 +++++++++++----------- docs/helpers/Obscura.md | 27 +++++++++++++++++++-- docs/installation.md | 35 ++++++++++++++++++++++++++++ docs/mcp.md | 2 +- docs/migration-4.md | 4 ++-- docs/parallel.md | 2 +- lib/helper/Obscura.js | 27 +++++++++++++++++++-- package.json | 2 +- 21 files changed, 134 insertions(+), 46 deletions(-) diff --git a/.github/workflows/appium_Android.yml b/.github/workflows/appium_Android.yml index b8408db69..e9347ebcd 100644 --- a/.github/workflows/appium_Android.yml +++ b/.github/workflows/appium_Android.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] test-suite: ['other', 'quick'] steps: diff --git a/.github/workflows/appium_iOS.yml b/.github/workflows/appium_iOS.yml index fa1420e6a..d7f72bf42 100644 --- a/.github/workflows/appium_iOS.yml +++ b/.github/workflows/appium_iOS.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] test-suite: ['other', 'quick'] steps: diff --git a/.github/workflows/doc-generation.yml b/.github/workflows/doc-generation.yml index 2ca410d1e..7c2acbd11 100644 --- a/.github/workflows/doc-generation.yml +++ b/.github/workflows/doc-generation.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - name: Check out the repo diff --git a/.github/workflows/dtslint.yml b/.github/workflows/dtslint.yml index 5a7053711..753de549d 100644 --- a/.github/workflows/dtslint.yml +++ b/.github/workflows/dtslint.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - uses: actions/checkout@v6 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/obscura.yml b/.github/workflows/obscura.yml index 7a3d7aac7..d5fb80a15 100644 --- a/.github/workflows/obscura.yml +++ b/.github/workflows/obscura.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index fe4559d9e..baac5d71c 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/plugin.yml b/.github/workflows/plugin.yml index 747ea1dec..83eea7359 100644 --- a/.github/workflows/plugin.yml +++ b/.github/workflows/plugin.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/puppeteer.yml b/.github/workflows/puppeteer.yml index 957e9779e..3f698e56f 100644 --- a/.github/workflows/puppeteer.yml +++ b/.github/workflows/puppeteer.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/sharding-demo.yml b/.github/workflows/sharding-demo.yml index e9259115b..7385fcb57 100644 --- a/.github/workflows/sharding-demo.yml +++ b/.github/workflows/sharding-demo.yml @@ -33,7 +33,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: 20 + node-version: 22 - name: Install dependencies run: npm install --ignore-scripts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4eb0de281..f2d9af1d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,7 +60,7 @@ jobs: strategy: matrix: - node-version: [ 20.x ] + node-version: [ 22.x ] steps: - uses: actions/checkout@v6 @@ -81,7 +81,7 @@ jobs: strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/webdriver.yml b/.github/workflows/webdriver.yml index 9700c13e6..031c44c7a 100644 --- a/.github/workflows/webdriver.yml +++ b/.github/workflows/webdriver.yml @@ -23,7 +23,7 @@ jobs: timeout-minutes: 25 strategy: matrix: - node-version: [20.x] + node-version: [22.x] steps: - run: docker run -d --net=host --shm-size=2g selenium/standalone-chrome:4.27 diff --git a/README.md b/README.md index f92fd287c..22dde6ccc 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ | 🌐 Web | Playwright | [![Playwright Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/playwright.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/playwright.yml) | | 🌐 Web | Puppeteer | [![Puppeteer Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml) | | 🌐 Web | WebDriver | [![WebDriver Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml) | +| 🌐 Web | Obscura | [![Obscura Helper Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/obscura.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/obscura.yml) | | 📱 Mobile | Appium | [![Appium Tests - Android](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appium_Android.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appium_Android.yml) | # CodeceptJS [![Made in Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua) @@ -42,6 +43,7 @@ CodeceptJS uses **Helper** modules to provide actions to `I` object. Currently, - [**Playwright**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Playwright.md) - is a Node library to automate the Chromium, WebKit and Firefox browsers with a single API. - [**Puppeteer**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Puppeteer.md) - uses Google Chrome's Puppeteer for fast headless testing. - [**WebDriver**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/WebDriver.md) - uses [webdriverio](http://webdriver.io/) to run tests via WebDriver or Devtools protocol. +- [**Obscura**](https://codecept.io/helpers/Obscura) - drives the lightweight Obscura browser through Chrome DevTools Protocol. See [Alternative Browser Engines](https://codecept.io/alternative-browsers). - [**Appium**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Appium.md) - for **mobile testing** with Appium - [**Detox**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Detox.md) - This is a wrapper on top of Detox library, aimed to unify testing experience for CodeceptJS framework. Detox provides a grey box testing for mobile applications, playing especially well for React Native apps. @@ -102,7 +104,7 @@ Later you can even automagically update Type Definitions to include your own cus Note: -- CodeceptJS requires Node.js version `12+` or later. +- CodeceptJS 4.2 requires Node.js `22.12.0` or later. ## Usage diff --git a/docs/alternative-browsers.md b/docs/alternative-browsers.md index 3dae50078..978128acc 100644 --- a/docs/alternative-browsers.md +++ b/docs/alternative-browsers.md @@ -5,6 +5,10 @@ title: Alternative Browser Engines # Alternative Browser Engines +::: warning Experimental +The `CDPBrowser`, `Obscura`, and `Kitesurf` helpers are experimental in CodeceptJS 4.2. Pin browser versions in CI and retain Playwright or WebDriver coverage for compatibility-critical tests. +::: + Playwright and Puppeteer drive full Chromium — the most accurate way to test what users see. But a new class of lightweight, agent-era browsers has appeared, and CodeceptJS can drive them through the `CDPBrowser` helper family: @@ -12,8 +16,7 @@ through the `CDPBrowser` helper family: - **[Obscura](https://github.com/h4ckf0r0day/obscura)** — an open-source Rust browser with a real V8 engine. From v0.2.0, the default release build also renders — real layout, computed styles, and screenshots — with `-no-render` builds still available for pure-speed, nothing-painted - scraping mode. A single 70 MB binary, ~30 MB RAM per instance, page loads in tens of - milliseconds. + scraping mode. Release archives are available for Linux, macOS, and Windows. - **[Kitesurf](https://blog.cloudflare.com/kitesurf/)** — Cloudflare's browser that runs in V8 isolates on Cloudflare Workers, with a real layout and rendering pipeline. Cloud-only, free in beta, planned to be open-sourced. @@ -24,10 +27,9 @@ on navigation races. ## When are they better than Playwright? -**Smoke suites where seconds matter.** An Obscura scenario (navigate, fill a form, submit, -assert) completes in 150–500 ms. There is no browser binary to download in CI — a 70 MB -static binary starts instantly. If your PR gate runs 50 smoke scenarios, Obscura turns -minutes into seconds. +**Smoke suites where startup and execution time matter.** Obscura is distributed as a standalone +binary and is designed for lightweight browser automation. Benchmark it against your own pages and +CI environment before choosing it for a PR gate. **Massive parallel scale.** Kitesurf sessions are Cloudflare Workers — they spawn in about a second, cost nothing while idle, and there is no practical ceiling on how many you run at once. @@ -57,9 +59,8 @@ app's real JavaScript in real V8; it only skips painting. For API-adjacent flows **Constrained environments.** ARM CI runners, thin containers, air-gapped machines: a static binary with no system dependencies goes where Chromium will not. -**Scraping-grade network realism.** Obscura's stealth mode presents a consistent Chrome TLS -fingerprint — useful when your tests must pass through bot-protection layers that block -headless Chromium. +**Optional stealth builds.** Obscura publishes separate `-stealth` archives. Treat their behaviour +as an Obscura capability rather than a browser-compatibility guarantee from CodeceptJS. ## When to stay with Playwright @@ -77,6 +78,10 @@ headless Chromium. ## Configuration +CodeceptJS 4.2 is tested in CI with Obscura 0.2.2. Obscura 0.2.x is recommended; 0.1.x and +`-no-render` builds operate without layout, visibility assertions, or screenshots. See +[Installation](/installation#obscura-experimental) for platform-specific archive names. + helpers: { Obscura: { url: 'http://localhost:3000', @@ -144,7 +149,7 @@ process — there is nothing to start by hand in the common case: | Screenshots | yes | yes (v0.2.0+ default builds); no on `-no-render`/v0.1.x | yes | | Visibility assertions | yes | yes (v0.2.0+ default builds); no, DOM-presence only, on `-no-render`/v0.1.x | yes | | Screencast / video (`screencast` plugin) | yes — WebM via `page.screencast`, with caption burn-in | yes — APNG via CDP `Page.startScreencast`, assembled in-process (v0.2.0+ default builds; verified PNG frames on the live server); no caption burn-in | untested | -| Startup cost | seconds + ~300 MB install | instant, 70 MB binary | ~1 s, zero local | +| Startup model | local browser process | standalone local binary | remote cloud session | | Parallel scale | machine-bound | machine-bound (light) | near-unlimited (cloud) | | Where it runs | local/grid | local | Cloudflare only | | License / cost | open source | Apache-2.0 | proprietary, free beta | diff --git a/docs/continuous-integration.md b/docs/continuous-integration.md index 2d18971cb..0c141285b 100644 --- a/docs/continuous-integration.md +++ b/docs/continuous-integration.md @@ -9,7 +9,7 @@ CodeceptJS runs in any CI that can install Node.js. This page covers the setup, ## Setup -- **Node.js** — install it on the runner (`actions/setup-node`, the `node:20` image, `NodeTool@0` on Azure). Examples below use Node 20. +- **Node.js 22.12 or newer** — install it on the runner (`actions/setup-node`, the `node:22` image, `NodeTool@0` on Azure). Examples below use Node 22. - **Headless** — `codecept.conf.js` must contain `setHeadlessWhen(process.env.HEADLESS || process.env.CI)`. `codeceptjs init` adds it; since CI sets `CI=true`, the suite runs headless automatically. ```js @@ -61,7 +61,7 @@ Use [`@testomatio/reporter`](https://github.com/testomatio/reporter). It ships p ## CI examples -Each example uses Playwright by default; a WebDriver variant follows where it differs. WebdriverIO 9 downloads its own browser and driver, so the WebDriver variants run on a plain `node:20` image with no Selenium service and no browser-install step. For Playwright, a `node:20` base image plus `npx playwright install --with-deps` keeps these configs free of version pins. +Each example uses Playwright by default; a WebDriver variant follows where it differs. WebdriverIO 9 downloads its own browser and driver, so the WebDriver variants run on a plain `node:22` image with no Selenium service and no browser-install step. For Playwright, a `node:22` base image plus `npx playwright install --with-deps` keeps these configs free of version pins. ### GitHub Actions — Playwright @@ -85,7 +85,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: npm - run: npm ci - run: npx playwright install --with-deps chromium @@ -115,7 +115,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - run: npm ci - run: npx codeceptjs check - run: npx codeceptjs run-workers 2 --by pool @@ -142,7 +142,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - run: npm ci - run: npx playwright install --with-deps chromium - run: npx codeceptjs check @@ -173,7 +173,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - run: npm ci - run: npx playwright install --with-deps - run: npx codeceptjs check @@ -194,7 +194,7 @@ stages: [test] playwright: stage: test - image: node:20 + image: node:22 variables: FORCE_COLOR: "1" parallel: 4 @@ -211,7 +211,7 @@ playwright: webdriver: stage: test - image: node:20 # WebdriverIO 9 downloads its own browser and driver + image: node:22 # WebdriverIO 9 downloads its own browser and driver script: - npm ci - npx codeceptjs check @@ -228,7 +228,7 @@ webdriver: `bitbucket-pipelines.yml`: ```yaml -image: node:20 +image: node:22 definitions: caches: @@ -260,7 +260,7 @@ pipelines: For WebDriver, no Selenium service or browser image is needed — WebdriverIO 9 downloads its own browser and driver: ```yaml -image: node:20 +image: node:22 pipelines: default: @@ -280,7 +280,7 @@ pipelines: pipeline { agent { docker { - image 'node:20' + image 'node:22' args '-u root' } } @@ -311,7 +311,7 @@ pipeline { } ``` -For WebDriver, keep the same `node:20` agent — WebdriverIO 9 downloads its own browser and driver, so no Selenium container is needed: +For WebDriver, keep the same `node:22` agent — WebdriverIO 9 downloads its own browser and driver, so no Selenium container is needed: ```groovy stage('Test') { @@ -332,7 +332,7 @@ version: 2.1 jobs: test: docker: - - image: cimg/node:20.18-browsers + - image: cimg/node:22.14-browsers parallelism: 4 steps: - checkout @@ -350,7 +350,7 @@ jobs: webdriver: docker: # WebdriverIO 9 downloads its own browser and driver - - image: cimg/node:20.18 + - image: cimg/node:22.14 steps: - checkout - run: npm ci diff --git a/docs/helpers/Obscura.md b/docs/helpers/Obscura.md index 29be715d0..257836962 100644 --- a/docs/helpers/Obscura.md +++ b/docs/helpers/Obscura.md @@ -22,6 +22,17 @@ This helper is a thin `CDPBrowser` subclass: it changes nothing about how locati elements works, it only pins the config presets Obscura requires and manages the `obscura serve` process lifecycle, the same way Playwright manages its own browser process. +> Obscura support is experimental in CodeceptJS 4.2. Pin the browser version in CI and keep a +> Playwright/WebDriver job for browser-compatibility coverage. + +## Compatibility + +| CodeceptJS | Recommended Obscura | Notes | +| --- | --- | --- | +| 4.2.x | 0.2.2 | Version used by the CodeceptJS Obscura CI workflow | +| 4.2.x | 0.2.x | Supported; capabilities are detected at runtime | +| 4.2.x | 0.1.x / `-no-render` | DOM-only mode; no layout, visibility assertions, or screenshots | + ## Modes * **ATTACH** — `endpoint` is set explicitly in the config. The helper only connects to it; it @@ -39,8 +50,20 @@ process lifecycle, the same way Playwright manages its own browser process. ## Install -Download a release binary and put it on your `PATH` (or point `binaryPath`/`OBSCURA_PATH` at -it directly) and the helper launches and tears it down for you automatically: +Download a release archive from [Obscura releases](https://github.com/h4ckf0r0day/obscura/releases). +CodeceptJS 4.2 is tested with Obscura 0.2.2. Rendering archives are available for: + +| platform | archive | +| --- | --- | +| Linux x64 | `obscura-x86_64-linux.tar.gz` | +| Linux ARM64 | `obscura-aarch64-linux.tar.gz` | +| macOS Intel | `obscura-x86_64-macos.tar.gz` | +| macOS Apple Silicon | `obscura-aarch64-macos.tar.gz` | +| Windows x64 | `obscura-x86_64-windows.zip` | + +Extract the archive and put `obscura` (`obscura.exe` on Windows) on your `PATH`, or point +`binaryPath`/`OBSCURA_PATH` at it. The helper then launches and tears it down automatically. +For example, on Linux x64: ```sh curl -sL https://github.com/h4ckf0r0day/obscura/releases/download/v0.2.2/obscura-x86_64-linux.tar.gz | tar xz diff --git a/docs/installation.md b/docs/installation.md index 725c5d3be..70f407ad4 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -7,6 +7,12 @@ title: Installation For the quickest start (CodeceptJS + Playwright) follow the [Quickstart](/quickstart). This page covers every browser, mobile, and API helper and what each one needs installed. +CodeceptJS 4.2 requires **Node.js 22.12 or newer**. Check your installed version before continuing: + +```sh +node --version +``` + ## Set up a project ```sh @@ -64,6 +70,35 @@ WebdriverIO 9 downloads and starts the matching driver automatically — no Sele To run against a cloud grid (Sauce Labs, BrowserStack, LambdaTest, and so on) instead, set the grid's `host`, `port`, `user`, and `key` (or `protocol` / `path`) in the helper config. For running this on CI, see [Continuous Integration](/continuous-integration). +## Obscura (experimental) + +Obscura is a lightweight browser driven through Chrome DevTools Protocol. CodeceptJS 4.2 is tested with Obscura 0.2.2. Obscura 0.2.x is the recommended version; older 0.1.x and `-no-render` builds have no layout, visibility assertions, or screenshots. + +Download the archive for your platform from the [Obscura releases](https://github.com/h4ckf0r0day/obscura/releases): + +| Platform | Rendering archive | +| --- | --- | +| Linux x64 | `obscura-x86_64-linux.tar.gz` | +| Linux ARM64 | `obscura-aarch64-linux.tar.gz` | +| macOS Intel | `obscura-x86_64-macos.tar.gz` | +| macOS Apple Silicon | `obscura-aarch64-macos.tar.gz` | +| Windows x64 | `obscura-x86_64-windows.zip` | + +Extract the archive and either put `obscura` (`obscura.exe` on Windows) on `PATH`, set `OBSCURA_PATH`, or configure `binaryPath`. The helper then starts and stops `obscura serve` automatically: + +```js +export const config = { + helpers: { + Obscura: { + url: 'http://localhost:3000', + // binaryPath: '/absolute/path/to/obscura', // optional + }, + }, +} +``` + +See [Alternative Browser Engines](/alternative-browsers) for connection modes and limitations, and the [Obscura helper reference](/helpers/Obscura) for every option. + ## Appium (mobile) Native iOS and Android testing. Appium speaks the WebDriver protocol, so CodeceptJS drives it through `webdriverio`: diff --git a/docs/mcp.md b/docs/mcp.md index b3a3333f1..bb6585ebe 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -441,7 +441,7 @@ Storage capture is **enabled** for `run_code`, `snapshot`, `run_step_by_step` fa ### Server doesn't start -- Node 18+ recommended. +- Node 22.12+ is required by CodeceptJS 4.2. - Verify the path / `npx` resolution in your client config. ### Config not found diff --git a/docs/migration-4.md b/docs/migration-4.md index 8223682bd..eba44b583 100644 --- a/docs/migration-4.md +++ b/docs/migration-4.md @@ -35,7 +35,7 @@ The rest of this guide documents every change the skill makes — read it if you ## 1. Update Node and Package -CodeceptJS 4.x supports Node 16+, but Node 20 or newer is recommended. +CodeceptJS 4.2 requires Node 22.12 or newer. This matches the minimum supported version of its current runtime dependencies. Upgrade Node before installing CodeceptJS 4.2. ```bash npm install codeceptjs@4 @@ -766,4 +766,4 @@ You don't need these to upgrade, but they unlock new workflows: 4. TypeScript users: run with `tsx` installed and confirm error stack traces point at `.ts` files. 5. If you removed `autoLogin`: confirm sessions restore under the `auth` plugin. 6. If you used `tryTo` / `retryTo` / `eachElement` plugins: grep your tests for the old globals and switch to subpath imports. -7. CI: bump the Node version to 20+ if you were on 18 or below. +7. CI: bump the Node version to 22.12+. diff --git a/docs/parallel.md b/docs/parallel.md index 5a1597709..d6ed1e080 100644 --- a/docs/parallel.md +++ b/docs/parallel.md @@ -100,7 +100,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - run: npm ci - run: npx codeceptjs run --shard ${{ matrix.shard }} ``` diff --git a/lib/helper/Obscura.js b/lib/helper/Obscura.js index 4854548f7..eb11e9428 100644 --- a/lib/helper/Obscura.js +++ b/lib/helper/Obscura.js @@ -39,6 +39,17 @@ const config = {} * elements works, it only pins the config presets Obscura requires and manages the `obscura serve` * process lifecycle, the same way Playwright manages its own browser process. * + * > Obscura support is experimental in CodeceptJS 4.2. Pin the browser version in CI and keep a + * > Playwright/WebDriver job for browser-compatibility coverage. + * + * ## Compatibility + * + * | CodeceptJS | Recommended Obscura | Notes | + * | --- | --- | --- | + * | 4.2.x | 0.2.2 | Version used by the CodeceptJS Obscura CI workflow | + * | 4.2.x | 0.2.x | Supported; capabilities are detected at runtime | + * | 4.2.x | 0.1.x / `-no-render` | DOM-only mode; no layout, visibility assertions, or screenshots | + * * ## Modes * * - **ATTACH** — `endpoint` is set explicitly in the config. The helper only connects to it; it @@ -56,8 +67,20 @@ const config = {} * * ## Install * - * Download a release binary and put it on your `PATH` (or point `binaryPath`/`OBSCURA_PATH` at - * it directly) and the helper launches and tears it down for you automatically: + * Download a release archive from [Obscura releases](https://github.com/h4ckf0r0day/obscura/releases). + * CodeceptJS 4.2 is tested with Obscura 0.2.2. Rendering archives are available for: + * + * | platform | archive | + * | --- | --- | + * | Linux x64 | `obscura-x86_64-linux.tar.gz` | + * | Linux ARM64 | `obscura-aarch64-linux.tar.gz` | + * | macOS Intel | `obscura-x86_64-macos.tar.gz` | + * | macOS Apple Silicon | `obscura-aarch64-macos.tar.gz` | + * | Windows x64 | `obscura-x86_64-windows.zip` | + * + * Extract the archive and put `obscura` (`obscura.exe` on Windows) on your `PATH`, or point + * `binaryPath`/`OBSCURA_PATH` at it. The helper then launches and tears it down automatically. + * For example, on Linux x64: * * ```sh * curl -sL https://github.com/h4ckf0r0day/obscura/releases/download/v0.2.2/obscura-x86_64-linux.tar.gz | tar xz diff --git a/package.json b/package.json index f187a27f0..d6771005d 100644 --- a/package.json +++ b/package.json @@ -207,7 +207,7 @@ } }, "engines": { - "node": ">=16.0", + "node": ">=22.12.0", "npm": ">=5.6.0" }, "es6": true, From 7f0f40db971232ce5281869090e2097eff759c36 Mon Sep 17 00:00:00 2001 From: Denys Kuchma Date: Thu, 17 Sep 2026 17:47:44 +0200 Subject: [PATCH 2/2] test: wait for init config reads --- test/runner/init_test.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/test/runner/init_test.js b/test/runner/init_test.js index ded751b30..cece7691c 100644 --- a/test/runner/init_test.js +++ b/test/runner/init_test.js @@ -69,13 +69,8 @@ describe('Init Command', function () { fs.existsSync(path.join(codecept_dir, 'codecept.conf.js')).should.be.true fs.existsSync(path.join(codecept_dir, 'steps_file.js')).should.be.true - fs.readFile(path.join(codecept_dir, 'codecept.conf.js'), 'utf8', (err, data) => { - if (err) { - throw Error(err); - return; - } - data.should.contain('./steps_file.js'); - }); + const config = fs.readFileSync(path.join(codecept_dir, 'codecept.conf.js'), 'utf8') + config.should.contain('./steps_file.js') }) it('should initialize a TS project', async () => { @@ -96,12 +91,7 @@ describe('Init Command', function () { fs.existsSync(path.join(codecept_dir, 'codecept.conf.ts')).should.be.true fs.existsSync(path.join(codecept_dir, 'steps_file.ts')).should.be.true - fs.readFile(path.join(codecept_dir, 'codecept.conf.ts'), 'utf8', (err, data) => { - if (err) { - throw Error(err); - return; - } - data.should.contain('./steps_file.ts'); - }); + const config = fs.readFileSync(path.join(codecept_dir, 'codecept.conf.ts'), 'utf8') + config.should.contain('./steps_file.ts') }) })