Skip to content

Feat/esm #5045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 287 commits into
base: 4.x
Choose a base branch
from
Open

Feat/esm #5045

wants to merge 287 commits into from

Conversation

DavertMik
Copy link
Contributor

Refactored to be fully ESM

Should be the base for 4.x branch

DavertMik and others added 30 commits January 13, 2025 01:45
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.7.2...v5.7.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@codeceptjs/detox-helper](https://github.com/codeceptjs/detox-helper) from 1.1.4 to 1.1.5.
- [Release notes](https://github.com/codeceptjs/detox-helper/releases)
- [Commits](codeceptjs/detox-helper@v1.1.4...v1.1.5)

---
updated-dependencies:
- dependency-name: "@codeceptjs/detox-helper"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* initial implementation for step params

* refactored steps

* refactored steps

* fixed refactoring

* fixed typings

* fixed typings

* added steps to export

* added step timeouts tests

* deprecated I.limitTime and I.retry

* fix failed timeout tests

* added test for case insensitive opt

* fixed flakiness of timeout tests

---------

Co-authored-by: DavertMik <davert@testomat.io>
Bumps [electron](https://github.com/electron/electron) from 33.2.1 to 33.3.1.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](electron/electron@v33.2.1...v33.3.1)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 23.11.1 to 24.0.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](puppeteer/puppeteer@puppeteer-v23.11.1...puppeteer-v24.0.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update AppiumV2_test.js

* Update appiumV2_Android.yml

* Update appiumV2_Android.yml

* Update AppiumV2_test.js

* Update AppiumV2_test.js

* Update AppiumV2_test.js

* Update AppiumV2_test.js

* Update appiumV2_Android.yml
* added logs for global timeout

* added debug info and removed timeout for before/after suite hooks

* fixed global timeouts for BeforeAfterSuite

---------

Co-authored-by: DavertMik <davert@testomat.io>
* fix: screenshots for sessions
* added sections for steps

* Update lib/steps.js

* Update test/data/sandbox/configs/step-sections/step-sections_test.js

* Update test/data/sandbox/configs/step-sections/step-sections_test.js

---------

Co-authored-by: DavertMik <davert@testomat.io>
* added result object, improved transport of tests

* fixed setting name for test

* fixed workers tests

* improved handling information between workers and main process

* fixed tests

* added result to typings

* fixed printing steps

* fixed def & failing tests

* fixing timeout errors

* fixed mocha hooks, analyze plugin, added custom reporter tests

* improved prompt for analyze plugin

* refactored timeouts to fix tests

* fixed saving screenshot file

* fixed step sections

* fixed tests for timeout errors

* added change fot pageInfo plugin

* fixed timeout tests

* fixed timeout tests with retries

---------

Co-authored-by: DavertMik <davert@testomat.io>
* added els step option

* added comment for fn step class

---------

Co-authored-by: DavertMik <davert@testomat.io>
* better hooks handling by submitting where test.failed occur

* reverted autologin plugin changes

* small fix to screenshot failures

* fixed screenshot tests

* fixed PW tests

---------

Co-authored-by: DavertMik <davert@testomat.io>
)

Bumps [monocart-coverage-reports](https://github.com/cenfun/monocart-coverage-reports) from 2.11.5 to 2.12.0.
- [Release notes](https://github.com/cenfun/monocart-coverage-reports/releases)
- [Changelog](https://github.com/cenfun/monocart-coverage-reports/blob/main/CHANGELOG.md)
- [Commits](cenfun/monocart-coverage-reports@2.11.5...2.12.0)

---
updated-dependencies:
- dependency-name: monocart-coverage-reports
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
kobenguyent and others added 22 commits August 12, 2025 09:57
- Add complete ESM migration guide (docs/esm-migration.md)
- Update CHANGELOG.md with ESM feature announcement
- Add ESM support section to installation docs
- Create working ESM example project with README
- Fix critical noTranslation bug in init command
- Upgrade inquirer to v12.9.2 and remove incompatible inquirer-test
- Update init tests to work with modern inquirer and ESM
- Document ESM execution order changes and minimal user impact
- Provide troubleshooting guidance for edge cases
- Fix timeout values from 10000 to 10 seconds in test configs
- Fix ESM import issue in session_test.js (codeceptjs global -> event import)
- Fix plugin test timeout and error handling
- Tests now properly run without hanging due to incorrect timeouts
…or handling

- Add terminal error detection for ERR_ABORTED and frame detachment errors
- Prevent infinite retries for unrecoverable navigation failures
- Improve screenshot plugin error handling with browser state checks
- Reduce screenshot timeout from 30s to 5s for faster failure
- Add terminal error handling in recorder to immediately re-throw fatal errors
- Enhance retryFailedStep plugin to skip terminal navigation errors

Fixes hanging issues in Playwright acceptance tests when frames are detached
or browser connections are lost during iframe/within operations.
@DavertMik
Copy link
Contributor Author

Wow wowow wo!
Thanks @kobenguyent

Copy link

Testomat.io Report 🟢 UNIT-TESTS PASSED
Tests ✔️ 340 tests run
Summary 🟢 339 passed; 🟡 1 skipped
Duration 🕐 6 seconds
Job 🗂️ Run Unit tests / unit-tests
Operating System 🖥️ Linux X64

🐢 Slowest Tests

  • Workers: should run worker with multiple config (1.565 seconds)
  • subtitles: should capture separate steps for separate tests (0.603 seconds)
  • Workers: should create worker by function (0.551 seconds)
  • Workers: should run simple worker (0.532 seconds)
  • Workers: should run worker with custom config (0.5 seconds)

Copy link

Testomat.io Report 🟢 UNIT-TESTS PASSED
Tests ✔️ 340 tests run
Summary 🟢 339 passed; 🟡 1 skipped
Duration 🕐 6 seconds
Job 🗂️ Run Unit tests / unit-tests
Operating System 🖥️ Linux X64

🐢 Slowest Tests

  • Workers: should run worker with multiple config (1.551 seconds)
  • subtitles: should capture separate steps for separate tests (0.603 seconds)
  • Workers: should run simple worker (0.539 seconds)
  • Workers: should run worker with custom config (0.521 seconds)
  • Workers: should create worker by function (0.511 seconds)

Copy link

Testomat.io Report 🔴 BUILD FAILED
Tests ✔️ 1 tests run
Summary 🔴 1 failed; 🟢 0 passed; 🟡 0 skipped
Duration 🕐 2 minutes, 0 seconds
Job 🗂️ TestCafe Tests / build
Operating System 🖥️ Linux X64

🟥 Failures (1)

🔴 TestCafe: "before all" hook in "TestCafe"

Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/CodeceptJS/CodeceptJS/test/helper/TestCafe_test.js)

################[ Failure ]################
Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/CodeceptJS/CodeceptJS/test/helper/TestCafe_test.js)

🐢 Slowest Tests

  • TestCafe: "before all" hook in "TestCafe" (2 minutes, 0.004 seconds)

Copy link

Testomat.io Report 🟢 RUNNER-TESTS PASSED
Tests ✔️ 195 tests run
Summary 🟢 195 passed; 🟡 0 skipped
Duration 🕐 3 minutes, 32 seconds
Job 🗂️ Run Unit tests / runner-tests
Operating System 🖥️ Linux X64

🐢 Slowest Tests

  • CodeceptJS Timeouts: should take --no-timeouts option (6.428 seconds)
  • Definitions: def should create definition file (5.627 seconds)
  • CodeceptJS Timeouts: should stop test when timeout exceeded (5.431 seconds)
  • CodeceptJS Timeouts: should prefer step timeout (4.701 seconds)
  • Definitions: def should create definition file with inject which contains I object from helpers (4.223 seconds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.