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 240 commits into
base: 4.x
Choose a base branch
from
Open

Feat/esm #5045

wants to merge 240 commits into from

Conversation

DavertMik
Copy link
Contributor

Refactored to be fully ESM

Should be the base for 4.x branch

dependabot bot and others added 30 commits January 2, 2025 17:31
Bumps [ts-morph](https://github.com/dsherret/ts-morph) from 24.0.0 to 25.0.0.
- [Release notes](https://github.com/dsherret/ts-morph/releases)
- [Commits](dsherret/ts-morph@24.0.0...25.0.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feature: clear individual cookie by name with Playwright (available since Playwright 1.43)

* feature: clear individual cookie by name with Playwright (available since Playwright 1.43)

* feature: clear individual cookie by name with Playwright (available since Playwright 1.43)

* feature: clear individual cookie by name with Playwright (available since Playwright 1.43)

* feature: clear individual cookie by name with Playwright (available since Playwright 1.43)

---------

Co-authored-by: Norbert Graf <[email protected]>
* added els functions

* implemented els module

* added els to package.json

* els functions & terminal improvements

* fixed metastep display

* remove not used test

---------

Co-authored-by: DavertMik <[email protected]>
* refactored mocha, implemented hooks

* refactored mocha classes, added class hooks

* fixed tests

* fixed formatting

* updated tests

* workers fix

* fixed def

* fixed type definitions

* refactored mocha classes

* fixed bdd tests

* added hook config

* fixed lint

* refactored tests

---------

Co-authored-by: DavertMik <[email protected]>
* Bump webdriverio to v9

* Adjust config

* Adjust config

* Remove options

* Update chrome driver

* Fix deprecations

* Fix deprecations

* Fix markup

* Added condition

* Fix more tests

* Fix iFrame stuff

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* try to fix some wdio tests

* Try to fix popup test

* Try to fix window size #resizeWindow

* Another fix

* Fix popup tests

* Enable should be authenticated

* Trigger Build

---------

Co-authored-by: kobenguyent <[email protected]>
Co-authored-by: kobenguyent <[email protected]>
* fixed regression in waitfortext

* fixed wait test for wait for text

* fixed retries for PW waitForText test

---------

Co-authored-by: DavertMik <[email protected]>
* update to async/await style

* update to async/await style
…4724)

* Bump eslint to 9.1.15 and removed dep to eslint-config-airbnb-base

* eslint ^9.17.0

* Re-added no-return-await
#4713)

* fixed pause finishing, added suggest for empty run, included fuse.js for better search

* fixed test

* updated plugins docs

* improved unit tests setup

* fixed interface test for CI mode

* fixed on ci

* added env variable config

---------

Co-authored-by: DavertMik <[email protected]>
* improve the docker compose networks

* improve the docker compose networks

* improve the docker compose networks
* 3.7.0-beta.1

* added check command

* added file

* added debug for container, fixed check command

* added support for custom config -c, added checks to workflows

* fixed check command

* added await for check

---------

Co-authored-by: DavertMik <[email protected]>
dependabot bot and others added 18 commits June 20, 2025 18:36
Bumps [sinon](https://github.com/sinonjs/sinon) from 20.0.0 to 21.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/commits)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.31.0 to 2.32.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.31.0...v2.32.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-version: 2.32.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.28.0 to 9.29.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.29.0/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.29.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 11.0.0 to 11.1.0.
- [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases)
- [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/main/CHANGELOG.md)
- [Commits](lo1tuma/eslint-plugin-mocha@11.0.0...11.1.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-mocha
  dependency-version: 11.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* fix: jsdoc.conf.js

* Update jsdoc.conf.js

* add types test

* Update global-variables.types.ts
Bumps [electron](https://github.com/electron/electron) from 36.4.0 to 37.1.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](electron/electron@v36.4.0...v37.1.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.0.2 to 24.0.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.0.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Bumps [typedoc-plugin-markdown](https://github.com/typedoc2md/typedoc-plugin-markdown/tree/HEAD/packages/typedoc-plugin-markdown) from 4.6.3 to 4.7.0.
- [Release notes](https://github.com/typedoc2md/typedoc-plugin-markdown/releases)
- [Changelog](https://github.com/typedoc2md/typedoc-plugin-markdown/blob/main/packages/typedoc-plugin-markdown/CHANGELOG.md)
- [Commits](https://github.com/typedoc2md/typedoc-plugin-markdown/commits/[email protected]/packages/typedoc-plugin-markdown)

---
updated-dependencies:
- dependency-name: typedoc-plugin-markdown
  dependency-version: 4.7.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

---
updated-dependencies:
- dependency-name: "@types/chai"
  dependency-version: 5.2.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@DavertMik DavertMik requested a review from kobenguyent July 19, 2025 10:21
@kobenguyent kobenguyent requested a review from Copilot July 21, 2025 06:42
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the codebase from CommonJS (CJS) to ECMAScript Modules (ESM) syntax, representing a foundational change for the 4.x branch. The conversion includes updating import/export statements, removing semicolons following ESM standards, and adapting module loading patterns for better compatibility.

Key changes include:

  • Converting require() statements to import statements and module.exports to export statements
  • Removing semicolons from most statements to align with ESM conventions
  • Updating dynamic module loading patterns with proper ESM compatibility fallbacks
  • Complete removal of the deprecated Protractor helper

Reviewed Changes

Copilot reviewed 111 out of 467 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/hooks.js Converted to ESM imports/exports with semicolon removal
lib/history.js Updated module syntax and removed semicolons
lib/helper/testcafe/testcafe-utils.js Mixed conversion retaining some CJS patterns
lib/helper/network/utils.js Full ESM conversion with export syntax changes
lib/helper/network/actions.js Updated imports and exports to ESM format
lib/helper/extras/Popup.js Converted exports while keeping CJS compatibility
lib/helper/extras/PlaywrightRestartOpts.js Converted to named ESM exports
lib/helper/errors/ElementNotFound.js Updated to ESM import/export syntax
lib/helper/WebDriver.js Extensive ESM conversion with dynamic import handling
lib/helper/TestCafe.js Mixed compatibility handling for ESM/CJS modules
lib/helper/REST.js Full ESM conversion with error handling improvements
lib/helper/Puppeteer.js Complete ESM refactoring with dynamic imports
lib/helper/Protractor.js Complete file removal (deprecated helper)
Comments suppressed due to low confidence (1)

lib/helper/WebDriver.js:32

  • The line 'this.context = this.root' appears to be incorrectly placed outside of a constructor or method. This will cause a syntax error as it's attempting to assign a property at the module level.
 *

Comment on lines +1 to +6
const { ClientFunction } = require('testcafe')

const assert = require('assert');
const fs = require('fs');
const path = require('path');
const { getParamNames } = require('../../utils');
const assert = require('assert')
const fs = require('fs')
const path = require('path')
const { getParamNames } = require('../../utils')
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file mixes ESM and CommonJS syntax. The first line uses CommonJS require() while other files in this PR use ESM imports. Consider converting all require() statements to import statements for consistency.

Copilot uses AI. Check for mistakes.

}
}

module.exports = Popup;
module.exports = Popup
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file uses module.exports instead of ESM export syntax. For consistency with the ESM conversion, this should be 'export default Popup' to match the pattern used in other converted files.

Suggested change
module.exports = Popup
export default Popup

Copilot uses AI. Check for mistakes.

await new Promise((done) => {
setTimeout(done, 1000);
});
await new Promise(done => {
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The arrow function parameter should be parenthesized for consistency. Use 'await new Promise((done) => {' instead of 'await new Promise(done => {' to maintain consistent parameter formatting.

Suggested change
await new Promise(done => {
await new Promise((done) => {

Copilot uses AI. Check for mistakes.

DavertMik and others added 6 commits July 22, 2025 02:32
- Convert all config files from CommonJS to ESM format
- Fix JSDoc generation for ESM codebase
- Update runok.cjs to convert ESM imports/exports to CommonJS for JSDoc compatibility
- Fix TypeScript definition generation issues
- Remove non-existent lib/within.js from JSDoc config
- Fix codeceptjs reference in index.d.ts
- All pre-commit hooks now pass successfully

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link

Testomat.io Report 🔴 UNIT-TESTS FAILED
Tests ✔️ 314 tests run
Summary 🔴 21 failed; 🟢 292 passed; 🟡 1 skipped
Duration 🕐 44 seconds
Job 🗂️ Run Unit tests / unit-tests
Operating System 🖥️ Linux X64

🟥 Failures (20)

🔴 Container: should support object by name

expected [Function] to throw Error

################[ Failure ]################
AssertionError (strictEqual): expected [Function] to throw Error
   124 |      expect(container.support('support1')).is.ok
   125 |      expect(container.support('support1').name).to.eql('hello')
   126 |      expect(container.support('support2')).is.ok
   127 |      expect(container.support('support2').name).to.eql('world')
   128 |
 > 129 |      expect(() => container.support('support3').name).to.throw(Error)
   130 |    })
   131 |  })
   132 |
   133 |  describe('#plugins', () => {
   134 |    beforeEach(async () => {

   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/container_test.js:129:64)

🔴 Container: should load DI and return a reference to the module

container.support(...).toString is not a function

################[ Failure ]################
TypeError: container.support(...).toString is not a function
   184 |        include: {
   185 |          dummyPage: './data/dummy_page',
   186 |        },
   187 |      })
   188 |      const dummyPage = await import('../data/dummy_page.js')
 > 189 |      expect(container.support('dummyPage').toString()).is.eql((dummyPage.default || dummyPage).toString())
   190 |    })
   191 |
   192 |    it('should load I from path and execute', async () => {
   193 |      await container.create({
   194 |        include: {

   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/container_test.js:189:45)

🔴 Container: should load I from path and execute

Custom actor loading from path './data/I' must be handled asynchronously during container creation

################[ Failure ]################
Error: Custom actor loading from path './data/I' must be handled asynchronously during container creation
   485 |function createActor(actorPath) {
   486 |  if (container.support.I) return container.support.I
   487 |
   488 |  if (actorPath) {
   489 |    // Actor path loading must be handled async during container creation
 > 490 |    throw new Error(`Custom actor loading from path '${actorPath}' must be handled asynchronously during container creation`)
   491 |  } else {
   492 |    container.support.I = actorFactory({}, Container)
   493 |  }
   494 |
   495 |  return container.support.I

   at createActor (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/container.js:490:11)
   at Container.create (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/container.js:71:5)
   at async Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/container_test.js:193:7)

🔴 Container: should load DI includes provided as require paths

expected {} to contain key 'openDummyPage'

################[ Failure ]################
AssertionError (deepStrictEqual): expected {} to contain key 'openDummyPage'


+ expected - actual
+ [
+   "openDummyPage"
+ ]
- []

   206 |        include: {
   207 |          dummyPage: './data/dummy_page',
   208 |        },
   209 |      })
   210 |      expect(container.support('dummyPage')).is.ok
 > 211 |      expect(container.support('dummyPage')).to.include.keys('openDummyPage')
   212 |    })
   213 |
   214 |    it('should load DI and inject I into PO', async () => {
   215 |      await container.create({
   216 |        include: {

   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/container_test.js:211:57)

🔴 Container: should load DI and inject I into PO

Custom actor loading from path './data/I' must be handled asynchronously during container creation

################[ Failure ]################
Error: Custom actor loading from path './data/I' must be handled asynchronously during container creation
   485 |function createActor(actorPath) {
   486 |  if (container.support.I) return container.support.I
   487 |
   488 |  if (actorPath) {
   489 |    // Actor path loading must be handled async during container creation
 > 490 |    throw new Error(`Custom actor loading from path '${actorPath}' must be handled asynchronously during container creation`)
   491 |  } else {
   492 |    container.support.I = actorFactory({}, Container)
   493 |  }
   494 |
   495 |  return container.support.I

   at createActor (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/container.js:490:11)
   at Container.create (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/container.js:71:5)
   at async Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/container_test.js:215:7)

🔴 Container: should load DI and inject custom I into PO

Custom actor loading from path './data/I' must be handled asynchronously during container creation

################[ Failure ]################
Error: Custom actor loading from path './data/I' must be handled asynchronously during container creation
   485 |function createActor(actorPath) {
   486 |  if (container.support.I) return container.support.I
   487 |
   488 |  if (actorPath) {
   489 |    // Actor path loading must be handled async during container creation
 > 490 |    throw new Error(`Custom actor loading from path '${actorPath}' must be handled asynchronously during container creation`)
   491 |  } else {
   492 |    container.support.I = actorFactory({}, Container)
   493 |  }
   494 |
   495 |  return container.support.I

   at createActor (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/container.js:490:11)
   at Container.create (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/container.js:71:5)
   at async Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/container_test.js:228:7)

🔴 els: should fail when condition is false

e.cliMessage is not a function

################[ Failure ]################
TypeError: e.cliMessage is not a function
   169 |
   170 |      try {
   171 |        await els.expectElement('.selector', async () => false)
   172 |        throw new Error('should have thrown error')
   173 |      } catch (e) {
 > 174 |        expect(e.cliMessage()).to.include('element (.selector)')
   175 |      }
   176 |    })
   177 |  })
   178 |
   179 |  describe('#expectAnyElement', () => {

   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/els_test.js:174:18)

🔴 els: should fail when no element matches condition

e.cliMessage is not a function

################[ Failure ]################
TypeError: e.cliMessage is not a function
   188 |
   189 |      try {
   190 |        await els.expectAnyElement('.selector', async () => false)
   191 |        throw new Error('should have thrown error')
   192 |      } catch (e) {
 > 193 |        expect(e.cliMessage()).to.include('any element of (.selector)')
   194 |      }
   195 |    })
   196 |  })
   197 |
   198 |  describe('#expectAllElements', () => {

   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/els_test.js:193:18)

🔴 els: should fail when any element does not match condition

e.cliMessage is not a function

################[ Failure ]################
TypeError: e.cliMessage is not a function
   207 |
   208 |      try {
   209 |        await els.expectAllElements('.selector', async el => el !== 'el2')
   210 |        throw new Error('should have thrown error')
   211 |      } catch (e) {
 > 212 |        expect(e.cliMessage()).to.include('element #2 of (.selector)')
   213 |      }
   214 |    })
   215 |  })
   216 |})
   217 |

   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/els_test.js:212:18)

🔴 AsyncWrapper: should work with async func

expected +0 to equal 4

################[ Failure ]################
AssertionError (strictEqual): expected +0 to equal 4


+ expected - actual
+ 4
- 0

   65 |      })
   66 |    }
   67 |
   68 |    await setup()
   69 |    testWrapper(test).fn(() => null)
 > 70 |    recorder.add('validation', () => expect(counter).to.eq(4))
   71 |    return recorder.promise()
   72 |  })
   73 |
   74 |  describe('events', () => {
   75 |    beforeEach(async () => {

   at <anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/mocha/asyncWrapper_test.js:70:57)

🔴 AsyncWrapper: should fire events

expected false to be truthy

################[ Failure ]################
AssertionError (strictEqual): expected false to be truthy
   88 |      await teardown()
   89 |      await suiteTeardown()
   90 |      return recorder
   91 |        .promise()
   92 |        .then(() => {
 > 93 |          expect(started.called).is.ok
   94 |          expect(beforeSuite.called).is.ok
   95 |          expect(afterSuite.called).is.ok
   96 |          expect(before.called).is.ok
   97 |          expect(after.called).is.ok
   98 |        })

   at <anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/mocha/asyncWrapper_test.js:93:36)

🔴 ui: context should contain BeforeAll

expected undefined to be truthy

################[ Failure ]################
AssertionError (strictEqual): expected undefined to be truthy
   22 |
   23 |  describe('basic constants', () => {
   24 |    const constants = ['Before', 'Background', 'BeforeAll', 'After', 'AfterAll', 'Scenario', 'xScenario']
   25 |
   26 |    constants.forEach(c => {
 > 27 |      it(`context should contain ${c}`, () => expect(context[c]).is.ok)
   28 |    })
   29 |  })
   30 |
   31 |  describe('Feature', () => {
   32 |    let suiteConfig

   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/mocha/ui_test.js:27:68)

🔴 ui: context should contain AfterAll

expected undefined to be truthy

################[ Failure ]################
AssertionError (strictEqual): expected undefined to be truthy
   22 |
   23 |  describe('basic constants', () => {
   24 |    const constants = ['Before', 'Background', 'BeforeAll', 'After', 'AfterAll', 'Scenario', 'xScenario']
   25 |
   26 |    constants.forEach(c => {
 > 27 |      it(`context should contain ${c}`, () => expect(context[c]).is.ok)
   28 |    })
   29 |  })
   30 |
   31 |  describe('Feature', () => {
   32 |    let suiteConfig

   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/mocha/ui_test.js:27:68)

🔴 retryFailedStep: "before each" hook for "should retry failed step"

Cannot read properties of undefined (reading 'stepShift')

################[ Failure ]################
TypeError: Cannot read properties of undefined (reading 'stepShift')
   70 |   * @param {string} msg
   71 |   */
   72 |  log(msg) {
   73 |    const _msg = isMaskedData() ? maskSensitiveData(msg) : msg
   74 |    if (outputLevel >= 3) {
 > 75 |      print(' '.repeat(this.stepShift), styles.log(truncate(`   ${_msg}`, this.spaceShift)))
   76 |    }
   77 |  },
   78 |
   79 |  /**
   80 |   * Print error

   at log (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/output.js:75:29)
   at Object.reset (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/recorder.js:95:5)
   at Object.start (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/recorder.js:51:10)
   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/plugin/retryFailedStep_test.js:20:14)

🔴 screenshotOnFail: "before each" hook for "should remove the . at the end of test title"

Cannot read properties of undefined (reading 'stepShift')

################[ Failure ]################
TypeError: Cannot read properties of undefined (reading 'stepShift')
   70 |   * @param {string} msg
   71 |   */
   72 |  log(msg) {
   73 |    const _msg = isMaskedData() ? maskSensitiveData(msg) : msg
   74 |    if (outputLevel >= 3) {
 > 75 |      print(' '.repeat(this.stepShift), styles.log(truncate(`   ${_msg}`, this.spaceShift)))
   76 |    }
   77 |  },
   78 |
   79 |  /**
   80 |   * Print error

   at log (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/output.js:75:29)
   at Object.reset (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/recorder.js:95:5)
   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/plugin/screenshotOnFail_test.js:15:14)

🔴 subtitles: "before each" hook for "should not capture subtitle as video artifact was missing"

Cannot read properties of undefined (reading 'stepShift')

################[ Failure ]################
TypeError: Cannot read properties of undefined (reading 'stepShift')
   70 |   * @param {string} msg
   71 |   */
   72 |  log(msg) {
   73 |    const _msg = isMaskedData() ? maskSensitiveData(msg) : msg
   74 |    if (outputLevel >= 3) {
 > 75 |      print(' '.repeat(this.stepShift), styles.log(truncate(`   ${_msg}`, this.spaceShift)))
   76 |    }
   77 |  },
   78 |
   79 |  /**
   80 |   * Print error

   at log (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/output.js:75:29)
   at Object.reset (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/recorder.js:95:5)
   at Object.start (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/recorder.js:51:10)
   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/plugin/subtitles_test.js:22:14)

🔴 Recorder: "before each" hook for "should create a promise"

Cannot read properties of undefined (reading 'stepShift')

################[ Failure ]################
TypeError: Cannot read properties of undefined (reading 'stepShift')
   70 |   * @param {string} msg
   71 |   */
   72 |  log(msg) {
   73 |    const _msg = isMaskedData() ? maskSensitiveData(msg) : msg
   74 |    if (outputLevel >= 3) {
 > 75 |      print(' '.repeat(this.stepShift), styles.log(truncate(`   ${_msg}`, this.spaceShift)))
   76 |    }
   77 |  },
   78 |
   79 |  /**
   80 |   * Print error

   at log (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/output.js:75:29)
   at Object.reset (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/recorder.js:95:5)
   at Object.start (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/recorder.js:51:10)
   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/recorder_test.js:5:29)

🔴 Workers: should run worker with custom config

expected +0 to equal 3

################[ Failure ]################
AssertionError (strictEqual): expected +0 to equal 3


+ expected - actual
+ 3
- 0

   107 |      passedCount += 1
   108 |    })
   109 |
   110 |    workers.on(event.all.result, result => {
   111 |      expect(result.hasFailed).equal(true)
 > 112 |      expect(passedCount).equal(3)
   113 |      expect(failedCount).equal(2)
   114 |      done()
   115 |    })
   116 |  })
   117 |

   at Workers.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/worker_test.js:112:27)
   at Workers._finishRun (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/workers.js:475:10)
   at Worker.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/workers.js:462:14)

🔴 Workers: should able to add tests to each worker

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

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

🔴 Workers: should able to add tests to using createGroupsOfTests

Cannot read properties of null (reading 'testFiles')

################[ Failure ]################
TypeError: Cannot read properties of null (reading 'testFiles')
   327 |
   328 |  /**
   329 |   * @param {Number} numberOfWorkers
   330 |   */
   331 |  createGroupsOfSuites(numberOfWorkers) {
 > 332 |    const files = this.codecept.testFiles
   333 |    const groups = populateGroups(numberOfWorkers)
   334 |
   335 |    const mocha = Container.mocha()
   336 |    mocha.files = files
   337 |    mocha.loadFiles()

   at Workers.createGroupsOfSuites (file:///home/runner/work/CodeceptJS/CodeceptJS/lib/workers.js:332:33)
   at Context.<anonymous> (file:///home/runner/work/CodeceptJS/CodeceptJS/test/unit/worker_test.js:159:32)

🐢 Slowest Tests

  • Workers: should able to add tests to each worker (40.001 seconds)
  • Workers: should run worker with multiple config (1.739 seconds)
  • Workers: should run simple worker (0.58 seconds)
  • Workers: should create worker by function (0.547 seconds)
  • Workers: should run worker with custom config (0.529 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.