Skip to content

Update dependency codeceptjs to v3.7.5 [SECURITY]#1053

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-codeceptjs-vulnerability
Open

Update dependency codeceptjs to v3.7.5 [SECURITY]#1053
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-codeceptjs-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Apr 1, 2026

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
codeceptjs (source) 3.5.113.7.5 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2025-57285

CodeceptJS versions 3.5.0 through 3.7.5-beta.18 contain a command injection vulnerability in the emptyFolder function (lib/utils.js). The execSync command directly concatenates the user-controlled directoryPath parameter without sanitization or escaping, allowing attackers to execute arbitrary commands.


Release Notes

Codeception/codeceptjs (codeceptjs)

v3.7.5

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

v3.7.4

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

  • Test Suite Shuffling: Randomize test execution order to discover test dependencies and improve test isolation (#​5051) - by @​NivYarmus

    # Shuffle tests to find order-dependent failures using lodash.shuffle algorithm
    npx codeceptjs run --shuffle
    
    # Combined with grep and other options
    npx codeceptjs run --shuffle --grep "@​smoke" --steps
  • Enhanced Interactive Debugging: Better logging for I.grab* methods in live interactive mode for clearer debugging output (#​4986) - by @​owenizedd

    // Interactive pause() now shows detailed grab results with JSON formatting
    I.amOnPage('/checkout')
    pause()  // Interactive shell started
    > I.grabTextFrom('.price')
    Result $res= "Grabbed text: $29.99"  // Pretty-printed JSON output
    > I.grabValueFrom('input[name="email"]')
    {"value":"user@example.com"}  // Structured JSON response

    🐛 Bug Fixes

  • Playwright Session Traces: Fixed trace file naming convention and improved error handling for multi-session test scenarios (#​5073) - by @​julien-ft-64 @​kobenguyent

    // Example outputs:
    // - a1b2c3d4-e5f6_checkout_login_test.failed.zip
    // - b2c3d4e5-f6g7_admin_dashboard_test.failed.zip

    Trace files use UUID prefixes with sessionName_testTitle.status.zip format

  • Worker Data Injection: Resolved proxy object serialization preventing data sharing between parallel test workers (#​5072) - by @​kobenguyent

    // Fixed: Complex objects can now be properly shared and injected between workers
    // Bootstrap data sharing in codecept.conf.js:
    exports.config = {
      bootstrap() {
        share({
          userData: { id: 123, preferences: { theme: 'dark' } },
          apiConfig: { baseUrl: 'https://api.test.com', timeout: 5000 },
        })
      },
    }
    
    // In tests across different workers:
    const testData = inject()
    console.log(testData.userData.preferences.theme) // 'dark' - deep nesting works
    console.log(Object.keys(testData)) // ['userData', 'apiConfig'] - key enumeration works
    
    // Dynamic sharing during test execution:
    share({ newData: 'shared across workers' })
  • Hook Exit Codes: Fixed improper exit codes when test hooks fail, ensuring CI/CD pipelines properly detect failures (#​5058) - by @​kobenguyent

    # Before: Exit code 0 even when beforeEach/afterEach failed
    # After: Exit code 1 when any hook fails, properly failing CI builds
  • TypeScript Effects Support: Added complete TypeScript definitions for effects functionality (#​5027) - by @​kobenguyent

    // Import effects with full TypeScript type definitions
    import { tryTo, retryTo, within } from 'codeceptjs/effects'
    
    // tryTo returns Promise<boolean> for conditional actions
    const success: boolean = await tryTo(async () => {
      await I.see('Cookie banner')
      await I.click('Accept')
    })
    
    // retryTo with typed parameters for reliability
    await retryTo(() => {
      I.click('Submit')
      I.see('Success')
    }, 3) // retry up to 3 times

    Note: Replaces deprecated global plugins - import from 'codeceptjs/effects' module

  • Mochawesome Screenshot Uniqueness: Fixed screenshot naming to prevent test failures from being overwritten when multiple tests run at the same time (#​4959) - by @​Lando1n

    // Problem: When tests run in parallel, screenshots had identical names
    // This caused later test screenshots to overwrite earlier ones
    
    // Before: All failed tests saved as "screenshot.png"
    // Result: Only the last failure screenshot was kept
    
    // After: Each screenshot gets a unique name with timestamp
    // Examples:
    // - "login_test_1645123456.failed.png"
    // - "checkout_test_1645123789.failed.png"
    // - "profile_test_1645124012.failed.png"
    
    // Configuration in codecept.conf.js:
    helpers: {
      Mochawesome: {
        uniqueScreenshotNames: true // Enable unique naming
      }
    }

    Ensures every failed test keeps its own screenshot for easier debugging

📖 Documentation

v3.7.3

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

➜  helloworld npx codeceptjs info
Environment information:

codeceptVersion:  "3.7.2"
nodeInfo:  18.19.0
osInfo:  macOS 14.4
cpuInfo:  (8) x64 Apple M1 Pro
osBrowsers:  "chrome: 133.0.6943.143, edge: 133.0.3065.92, firefox: not installed, safari: 17.4"
playwrightBrowsers:  "chromium: 133.0.6943.16, firefox: 134.0, webkit: 18.2"
helpers:  {
"Playwright": {
"url": "http://localhost",
...

🐛 Bug Fixes

v3.7.2

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

🐛 Bug Fixes

  • fix(stepByStepReport): no records html is generated when running with run-workers (#​4638)
  • fix(webdriver): bidi error in log with webdriver (#​4850)
  • fix(types): TS types of methods (Feature|Scenario)Config.config (#​4851)
  • fix: redundant popup log (#​4830)
  • fix(webdriver): grab browser logs using bidi protocol (#​4754)
  • fix(webdriver): screenshots for sessions (#​4748)

📖 Documentation

v3.7.1

Compare Source

  • Fixed reading charAt error in asyncWrapper.js

v3.7.0

Compare Source

This release introduces major new features and internal refactoring. It is an important step toward the 4.0 release planned soon, which will remove all deprecations introduced in 3.7.

🛩️ Features

🔥 Native Element Functions

A new Els API for direct element interactions has been introduced. This API provides low-level element manipulation functions for more granular control over element interactions and assertions:

  • element() - perform custom operations on first matching element
  • eachElement() - iterate and perform operations on each matching element
  • expectElement() - assert condition on first matching element
  • expectAnyElement() - assert condition matches at least one element
  • expectAllElements() - assert condition matches all elements

Example using all element functions:

const { element, eachElement, expectElement, expectAnyElement, expectAllElements } = require('codeceptjs/els')

// ...

Scenario('element functions demo', async ({ I }) => {
  // Get attribute of first button
  const attr = await element('.button', async el => await el.getAttribute('data-test'))

  // Log text of each list item
  await eachElement('.list-item', async (el, idx) => {
    console.log(`Item ${idx}: ${await el.getText()}`)
  })

  // Assert first submit button is enabled
  await expectElement('.submit', async el => await el.isEnabled())

  // Assert at least one product is in stock
  await expectAnyElement('.product', async el => {
    return (await el.getAttribute('data-status')) === 'in-stock'
  })

  // Assert all required fields have required attribute
  await expectAllElements('.required', async el => {
    return (await el.getAttribute('required')) !== null
  })
})

Els functions expose the native API of Playwright, WebDriver, and Puppeteer helpers. The actual el API will differ depending on which helper is used, which affects test code interoperability.

🔮 Effects introduced

Effects is a new concept that encompasses all functions that can modify scenario flow. These functions are now part of a single module. Previously, they were used via plugins like tryTo and retryTo. Now, it is recommended to import them directly:

const { tryTo, retryTo } = require('codeceptjs/effects')

Scenario(..., ({ I }) => {
  I.amOnPage('/')
  // tryTo returns boolean if code in function fails
  // use it to execute actions that may fail but not affect the test flow
  // for instance, for accepting cookie banners
  const isItWorking = tryTo(() => I.see('It works'))

  // run multiple steps and retry on failure
  retryTo(() => {
    I.click('Start Working!');
    I.see('It works')
  }, 5);
})

Previously tryTo and retryTo were available globally via plugins. This behavior is deprecated as of 3.7 and will be removed in 4.0. Import these functions via effects instead. Similarly, within will be moved to effects in 4.0.

check command added
npx codeceptjs check

This command can be executed locally or in CI environments to verify that tests can be executed correctly.

It checks:

  • configuration
  • tests
  • helpers

And will attempt to open and close a browser if a corresponding helper is enabled. If something goes wrong, the command will fail with a message. Run npx codeceptjs check on CI before actual tests to ensure everything is set up correctly and all services and browsers are accessible.

For GitHub Actions, add this command:

steps:
  # ...
  - name: check configuration and browser
    run: npx codeceptjs check

  - name: run codeceptjs tests
    run: npx codeceptjs run-workers 4
👨‍🔬 analyze plugin introduced

This AI plugin analyzes failures in test runs and provides brief summaries. For more than 5 failures, it performs cluster analysis and aggregates failures into groups, attempting to find common causes. It is recommended to use Deepseek R1 model or OpenAI o3 for better reasoning on clustering:

 SUMMARY The test failed because the expected text "Sign in" was not found on the page, indicating a possible issue with HTML elements or their visibility.
 ERROR expected web application to include "Sign in"
 CATEGORY HTML / page elements (not found, not visible, etc)
 URL http://127.0.0.1:3000/users/sign_in

For fewer than 5 failures, they are analyzed individually. If a visual recognition model is connected, AI will also scan screenshots to suggest potential failure causes (missing button, missing text, etc).

This plugin should be paired with the newly added pageInfo plugin which stores important information like URL, console logs, and error classes for further analysis.

👨‍💼 autoLogin plugin renamed to auth plugin

auth is the new name for the autoLogin plugin and aims to solve common authorization issues. In 3.7 it can use Playwright's storage state to load authorization cookies in a browser on start. So if a user is already authorized, a browser session starts with cookies already loaded for this user. If you use Playwright, you can enable this behavior using the loginAs method inside a BeforeSuite hook:

BeforeSuite(({ loginAs }) => loginAs('user'))

The previous behavior where loginAs was called from a Before hook also works. However, cookie loading and authorization checking is performed after the browser starts.

Metadata introduced

Meta information in key-value format can be attached to Scenarios to provide more context when reporting tests:

// add Jira issue to scenario
Scenario('...', () => {
  // ...
}).meta('JIRA', 'TST-123')

// or pass meta info in the beginning of scenario:
Scenario('my test linked to Jira', meta: { issue: 'TST-123' }, () => {
  // ...
})

By default, Playwright helpers add browser and window size as meta information to tests.

👢 Custom Steps API

Custom Steps or Sections API introduced to group steps into sections:

const { Section } = require('codeceptjs/steps');

Scenario({ I } => {
  I.amOnPage('/projects');

  // start section "Create project"
  Section('Create a project');
  I.click('Create');
  I.fillField('title', 'Project 123')
  I.click('Save')
  I.see('Project created')
  // calling Section with empty param closes previous section
  Section()

  // previous section automatically closes
  // when new section starts
  Section('open project')
  // ...
});

To hide steps inside a section from output use Section().hidden() call:

Section('Create a project').hidden()
// next steps are not printed:
I.click('Create')
I.fillField('title', 'Project 123')
Section()

Alternative syntax for closing section: EndSection:

const { Section, EndSection } = require('codeceptjs/steps');

// ...
Scenario(..., ({ I }) =>  // ...

  Section('Create a project').hidden()
  // next steps are not printed:
  I.click('Create');
  I.fillField('title', 'Project 123')
  EndSection()

Also available BDD-style pre-defined sections:

const { Given, When, Then } = require('codeceptjs/steps');

// ...
Scenario(..., ({ I }) =>  // ...

  Given('I have a project')
  // next steps are not printed:
  I.click('Create');
  I.fillField('title', 'Project 123')

  When('I open project');
  // ...

  Then('I should see analytics in a project')
  //....
🥾 Step Options

Better syntax to set general step options for specific tests.

Use it to set timeout or retries for specific steps:

const step = require('codeceptjs/steps');

Scenario(..., ({ I }) =>  // ...
  I.click('Create', step.timeout(10).retry(2));
  //....

Alternative syntax:

const { stepTimeout, stepRetry } = require('codeceptjs/steps');

Scenario(..., ({ I }) =>  // ...
  I.click('Create', stepTimeout(10));
  I.see('Created', stepRetry(2));
  //....

This change deprecates previous syntax:

  • I.limitTime().act(...) => replaced with I.act(..., stepTimeout())
  • I.retry().act(...) => replaced with I.act(..., stepRetry())

Step options should be passed as the very last argument to I.action() call.

Step options can be used to pass additional options to currently existing methods:

const { stepOpts } = require('codeceptjs/steps')

I.see('SIGN IN', stepOpts({ ignoreCase: true }))

Currently this works only on see and only with ignoreCase param.
However, this syntax will be extended in next versions.

Test object can be injected into Scenario

API for direct access to test object inside Scenario or hooks to add metadata or artifacts:

BeforeSuite(({ suite }) => {
  // no test object here, test is not created yet
})

Before(({ test }) => {
  // add artifact to test
  test.artifacts.myScreenshot = 'screenshot'
})

Scenario('test store-test-and-suite test', ({ test }) => {
  // add custom meta data
  test.meta.browser = 'chrome'
})

After(({ test }) => {})

Object for suite is also injected for all Scenario and hooks.

Notable changes
  • Load official Gherkin translations into CodeceptJS. See #​4784 by @​ebo-zig
  • 🇳🇱 NL translation introduced by @​ebo-zig in #​4784:
  • [Playwright] Improved experience to highlight and print elements in debug mode
  • codeceptjs run fails on CI if no tests were executed. This helps to avoid false positive checks. Use DONT_FAIL_ON_EMPTY_RUN env variable to disable this behavior
  • Various console output improvements
  • AI suggested fixes from heal plugin (which heals failing tests on the fly) shown in run-workers command
  • plugin/standatdActingHelpers replaced with Container.STANDARD_ACTING_HELPERS
🐛 Bug Fixes
  • Fixed timeouts for BeforeSuite and AfterSuite
  • Fixed stucking process on session switch
🎇 Internal Refactoring

This section is listed briefly. A new dedicated page for internal API concepts will be added to documentation

  • File structure changed:
    • mocha classes moved to lib/mocha
    • step is split to multiple classes and moved to lib/step
  • Extended and exposed to public API classes for Test, Suite, Hook
  • Container:
    • refactored to be prepared for async imports in ESM.
    • added proxy classes to resolve circular dependencies
  • Step
  • Result object added
    • event.all.result now sends Result object with all failures and stats included
  • run-workers refactored to use Result to send results from workers to main process
  • Timeouts refactored listener/timeout => globalTimeout
  • Reduced usages of global variables, more attributes added to store to share data on current state between different parts of system
  • events API improved
    • Hook class is sent as param for event.hook.passed, event.hook.finished
    • event.test.failed, event.test.finished always sends Test. If test has failed in Before or BeforeSuite hook, event for all failed test in this suite will be sent
    • if a test has failed in a hook, a hook name is sent as 3rd arg to event.test.failed

v3.6.10

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🐛 Bug Fixes
fix(cli): missing failure counts when there is failedHooks (#​4633) - by @​kobenguyent

v3.6.9

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🐛 Hot Fixes
fix: could not run tests due to missing invisi-data lib - by @​kobenguyent

v3.6.8

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

export const config: CodeceptJS.MainConfig = {
  tests:  '**/*.e2e.test.ts',
  retry: 4,
  output: './output',
  maskSensitiveData: true,
  emptyOutputFolder: true,
...

    I login {"username":"helloworld@test.com","password": "****"}
      I send post request "https://localhost:8000/login", {"username":"helloworld@test.com","password": "****"}
      › [Request] {"baseURL":"https://localhost:8000/login","method":"POST","data":{"username":"helloworld@test.com","password": "****"},"headers":{}}
      › [Response] {"access-token": "****"}
I.sendDeleteRequestWithPayload('/api/users/1', { author: 'john' })

🐛 Bug Fixes

> codeceptjs dry-run --steps --grep "(?=.*Checkout process)"
Add hint to "I.seeEmailAttachment" that under the hood parameter is treated as RegExp.
When you don't know it, it can cause a lot of pain, wondering why your test fails with I.seeEmailAttachment('Attachment(1).pdf') although it looks just fine, but actually I.seeEmailAttachment('Attachment\\(1\\).pdf is required to make the test green, in case the attachment is called "Attachment(1).pdf" with special character in it.

📖 Documentation

v3.6.7

Compare Source

v3.6.6

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

Zero-configuration when paired with other helpers like REST, Playwright:

// inside codecept.conf.js
{
  helpers: {
    Playwright: {...},
    SoftExpectHelper: {},
  }
}
// in scenario
I.softExpectEqual('a', 'b')
I.flushSoftAssertions() // Throws an error if any soft assertions have failed. The error message contains all the accumulated failures.

🐛 Bug Fixes

// fix the validation of httpAgent config. we could now pass ca, instead of key/cert.
{
  helpers: {
    REST: {
      endpoint: 'http://site.com/api',
      prettyPrintJson: true,
      httpAgent: {
         ca: fs.readFileSync(__dirname + '/path/to/ca.pem'),
         rejectUnauthorized: false,
         keepAlive: true
      }
    }
  }
}

📖 Documentation

v3.6.5

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

it('should wait for input text field to be disabled', () =>
      I.amOnPage('/form/wait_disabled').then(() => I.waitForDisabled('#text', 1)))

    it('should wait for input text field to be enabled by xpath', () =>
      I.amOnPage('/form/wait_disabled').then(() => I.waitForDisabled("//*[@&#8203;name = 'test']", 1)))

    it('should wait for a button to be disabled', () =>
      I.amOnPage('/form/wait_disabled').then(() => I.waitForDisabled('#text', 1)))

Waits for element to become disabled (by default waits for 1sec).
Element can be located by CSS or XPath.

@&#8203;param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
@&#8203;param {number} [sec=1] (optional) time in seconds to wait, 1 by default.
@&#8203;returns {void} automatically synchronized promise through #recorder

🐛 Bug Fixes

📖 Documentation

v3.6.4

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

Config:

...
REST: {
 ...
 printCurl: true,
 ...
}
...

› [CURL Request] curl --location --request POST https://httpbin.org/post -H ...
  • feat(AI): Generate PageObject, added types, shell improvement (#​4319) - by @​DavertMik
    • added askForPageObject method to generate PageObjects on the fly
    • improved AI types
    • interactive shell improved to restore history

Screenshot from 2024-06-17 02-47-37

🐛 Bug Fixes

📖 Documentation

v3.6.3

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

🐛 Bug Fixes

📖 Documentation

v3.6.2

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

Support the httpAgent conf to create the TSL connection via REST helper

{
  helpers: {
    REST: {
      endpoint: 'http://site.com/api',
      prettyPrintJson: true,
      httpAgent: {
         key: fs.readFileSync(__dirname + '/path/to/keyfile.key'),
         cert: fs.readFileSync(__dirname + '/path/to/certfile.cert'),
         rejectUnauthorized: false,
         keepAlive: true
      }
    }
  }
}

Currently only screenshot of the active session is saved, this PR aims to save the screenshot of every session for easy debugging

Scenario('should save screenshot for sessions @&#8203;WebDriverIO @&#8203;Puppeteer @&#8203;Playwright', async ({ I }) => {
  await I.amOnPage('/form/bug1467');
  await I.saveScreenshot('original.png');
  await I.amOnPage('/');
  await I.saveScreenshot('main_session.png');
  session('john', async () => {
    await I.amOnPage('/form/bug1467');
    event.dispatcher.emit(event.test.failed, this);
  });

  const fileName = clearString('should save screenshot for active session @&#8203;WebDriverIO @&#8203;Puppeteer @&#8203;Playwright');
  const [original, failed] = await I.getSHA256Digests([
    `${output_dir}/original.png`,
    `${output_dir}/john_${fileName}.failed.png`,
  ]);

  // Assert that screenshots of same page in same session are equal
  await I.expectEqual(original, failed);

  // Assert that screenshots of sessions are created
  const [main_original, session_failed] = await I.getSHA256Digests([
    `${output_dir}/main_session.png`,
    `${output_dir}/john_${fileName}.failed.png`,
  ]);
  await I.expectNotEqual(main_original, session_failed);
});

Screenshot 2024-04-29 at 11 07 47

Find an element with class attribute

// find div with class contains 'form'
locate('div').withClassAttr('text')
  • fix(playwright): set the record video resolution (#​4311) - by @​KobeNguyent
    You could now set the recording video resolution
  url: siteUrl,
  windowSize: '300x500',
  show: false,
  restart: true,
  browser: 'chromium',
  trace: true,
  video: true,
  recordVideo: {
    size: {
      width: 400,
      height: 600,
    },
  },

🐛 Bug Fixes

📖 Documentation

v3.6.1

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🐛 Bug Fixes
fix(cli): missing failure counts when there is failedHooks (#​4633) - by @​kobenguyent

v3.6.0

Compare Source

🛩️ Features

  • Introduced healers to improve stability of failed tests. Write functions that can perform actions to fix a failing test:
heal.addRecipe('reloadPageIfModalIsNotVisisble', {
  steps: ['click'],
  fn: async ({ error, step }) => {
    // this function will be executed only if test failed with
    // "model is not visible" message
    if (error.message.include('modal is not visible')) return

    // we return a function that will refresh a page
    // and tries to perform last step again
    return async ({ I }) => {
      I.reloadPage()
      I.wait(1)
      await step.run()
    }
    // if a function succeeds, test continues without an error
  },
})
  • Breaking Change AI features refactored. Read updated AI guide:

    • removed dependency on openai
    • added support for Azure OpenAI, Claude, Mistal, or any AI via custom request function
    • --ai option added to explicitly enable AI features
    • heal plugin decoupled from AI to run custom heal recipes
    • improved healing for async/await scenarios
    • token limits added
    • token calculation introduced
    • OpenAI helper renamed to AI
  • feat(puppeteer): network traffic manipulation. See #​4263 by @​KobeNguyenT

    • startRecordingTraffic
    • grabRecordedNetworkTraffics
    • flushNetworkTraffics
    • stopRecordingTraffic
    • seeTraffic
    • dontSeeTraffic
  • feat(Puppeteer): recording WS messages. See #​4264 by @​KobeNguyenT

Recording WS messages:

      I.startRecordingWebSocketMessages();
      I.amOnPage('https://websocketstest.com/');
      I.waitForText('Work for You!');
      const wsMessages = I.grabWebSocketMessages();
      expect(wsMessages.length).to.greaterThan(0);

flushing WS messages:

      I.startRecordingWebSocketMessages();
      I.amOnPage('https://websocketstest.com/');
      I.waitForText('Work for You!');
      I.flushWebSocketMessages();
      const wsMessages = I.grabWebSocketMessages();
      expect(wsMessages.length).to.equal(0);

Examples:

// recording traffics and verify the traffic
I.startRecordingTraffic()
I.amOnPage('https://codecept.io/')
I.seeTraffic({ name: 'traffics', url: 'https://codecept.io/img/companies/BC_LogoScreen_C.jpg' })
// check the traffic with advanced params
I.amOnPage('https://openai.com/blog/chatgpt')
I.startRecordingTraffic()
I.seeTraffic({
  name: 'sentry event',
  url: 'https://images.openai.com/blob/cf717bdb-0c8c-428a-b82b-3c3add87a600',
  parameters: {
    width: '1919',
    height: '1138',
  },
})
Scenario('using playwright locator @&#8203;Playwright', () => {
  I.amOnPage('https://codecept.io/test-react-calculator/');
  I.click('7');
  I.click({ pw: '_react=t[name = "="]' });
  I.seeElement({ pw: '_react=t[value = "7"]' });
  I.click({ pw: '_react=t[name = "+"]' });
  I.click({ pw: '_react=t[name = "3"]' });
  I.click({ pw: '_react=t[name = "="]' });
  I.seeElement({ pw: '_react=t[value = "10"]' });
});
Scenario('using playwright data-testid attribute @&#8203;Playwright', () => {
    I.amOnPage('/');
    const webElements = await I.grabWebElements({ pw: '[data-testid="welcome"]' });
    assert.equal(webElements[0]._selector, '[data-testid="welcome"] >> nth=0');
    assert.equal(webElements.length, 1);
});

Network requests & responses can be mocked and modified. Use mockRoute which strictly follows Puppeteer's setRequestInterception API.

I.mockRoute('https://reqres.in/api/comments/1', request => {
  request.respond({
    status: 200,
    headers: { 'Access-Control-Allow-Origin': '*' },
    contentType: 'application/json',
    body: '{"name": "this was mocked" }',
  });
})
I.mockRoute('**/*.{png,jpg,jpeg}', route => route.abort());

// To disable mocking for a route call `stopMockingRoute`
// for previously mocked URL
I.stopMockingRoute('**/*.{png,jpg,jpeg}');

To master request intercepting use HTTPRequest object passed into mock request handler.

🐛 Bug Fixes

v3.5.15

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

  • feat: improve code coverage plugin (#​4252) - by @​KobeNguyenT
    We revamp the coverage plugin to make it easier to use

Once all the tests are completed, codecept will create and store coverage in output/coverage folder, as shown below.

Open index.html in your browser to view the full interactive coverage report.

🐛 Bug Fixes

dry-run command now supports test level grep.

Tests from /Users/t/Desktop/projects/codeceptjs-rest-demo:@&#8203;jaja

GET tests -- /Users/t/Desktop/projects/codeceptjs-rest-demo/src/GET_test.ts -- 4 tests
  ☐ Verify getting a single user @&#8203;jaja
  ☐ Verify getting list of users @&#8203;jaja
PUT tests -- /Users/t/Desktop/projects/codeceptjs-rest-demo/src/PUT_test.ts -- 4 tests
  ☐ Verify creating new user @&#8203;Jaja

  Total: 2 suites | 3 tests

--- DRY MODE: No tests were executed ---
➜  codeceptjs-rest-demo git:(master) ✗ npx codeceptjs dry-run
Tests from /Users/t/Desktop/projects/codeceptjs-rest-demo:

DELETE tests -- /Users/t/Desktop/projects/codeceptjs-rest-demo/src/DELETE_test.ts -- 4 tests
  ☐ Verify deleting a user
GET tests -- /Users/t/Desktop/projects/codeceptjs-rest-demo/src/GET_test.ts -- 4 tests
  ☐ Verify a successful call
  ☐ Verify a not found call
  ☐ Verify getting a single user @&#8203;jaja
  ☐ Verify getting list of users @&#8203;jaja
POST tests -- /Users/tDesktop/projects/codeceptjs-rest-demo/src/POST_test.ts -- 4 tests
  ☐ Verify creating new user
  ☐ Verify uploading a file
PUT tests -- /Users/tDesktop/projects/codeceptjs-rest-demo/src/PUT_test.ts -- 4 tests
  ☐ Verify creating new user @&#8203;Jaja

  Total: 4 suites | 8 tests

--- DRY MODE: No tests were executed ---
  • Several internal fixes and improvements for github workflows

v3.5.14

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🐛 Bug Fixes

v3.5.13

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

  • feat: mock server helper (#​4155) - by @​KobeNguyenT
    Screenshot 2024-01-25 at 13 47 59
  • feat(webdriver): network traffics manipulation (#​4166) - by @​KobeNguyenT
    [Webdriver] Added commands to check network traffics - supported only with devtoolsProtocol
    • startRecordingTraffic
    • grabRecordedNetworkTraffics
    • flushNetworkTraffics
    • stopRecordingTraffic
    • seeTraffic
    • dontSeeTraffic

Examples:

// recording traffics and verify the traffic
I.startRecordingTraffic()
I.amOnPage('https://codecept.io/')
I.seeTraffic({ name: 'traffics', url: 'https://codecept.io/img/companies/BC_LogoScreen_C.jpg' })
// check the traffic with advanced params
I.amOnPage('https://openai.com/blog/chatgpt')
I.startRecordingTraffic()
I.seeTraffic({
  name: 'sentry event',
  url: 'https://images.openai.com/blob/cf717bdb-0c8c-428a-b82b-3c3add87a600',
  parameters: {
    width: '1919',
    height: '1138',
  },
})
I.waitForCookie('token')

🐛 Bug Fixes

const limitation = [':nth-of-type', ':first-of-type', ':last-of-type', ':nth-last-child', ':nth-last-of-type', ':checked', ':disabled', ':enabled', ':required', ':lang']; fixes the issue. Then an old conversion way over css-to-xpath is used.

📖 Documentation

🛩️ Several bugfixes and improvements for Codecept-UI

  • Several internal improvements
  • fix: title is not showing when visiting a test
  • fix: handle erros nicely

v3.5.12

Compare Source

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ Features

  • feat: upgrade wdio (#​4123) - by @​KobeNguyenT

    🛩️ With the release of WebdriverIO version v8.14.0, and onwards, all driver management hassles are now a thing of the past 🙌. Read more here.
    One of the significant advantages of this update is that you can now get rid of any driver services you previously had to manage, such as
    wdio-chromedriver-service, wdio-geckodriver-service, wdio-edgedriver-service, wdio-safaridriver-service, and even @wdio/selenium-standalone-service.

For those who require custom driver options, fear not; WebDriver Helper allows you to pass in driver options through custom WebDriver configuration.
If you have a custom grid, use a cloud service, or prefer to run your own driver, there's no need to worry since WebDriver Helper will only start a driver when there are no other connection information settings like hostname or port specified.

Example:

{
   helpers: {
     WebDriver : {
       smartWait: 5000,
       browser: "chrome",
       restart: false,
       windowSize: "maximize",
       timeouts: {
         "script": 60000,
         "page load": 10000
       }
     }
   }
}

Testing Chrome locally is now more convenient than ever. You can define a browser channel, and WebDriver Helper will take care of downloading the specified browser version for you.
For example:

{
   helpers: {
     WebDriver : {
       smartWait: 5000,
       browser: "chrome",
       browserVersion: '116.0.5793.0', // or 'stable', 'beta', 'dev' or 'canary'
       restart: false,
       windowSize: "maximize",
       timeouts: {
         "script": 60000,
         "page load": 10000
       }
     }
   }
}

Running with devtools protocol

{
   helpers: {
     WebDriver : {
       url: "http://localhost",
       browser: "chrome",
       devtoolsProtocol: true,
       desiredCapabilities: {
         chromeOptions: {
           args: [ "--headless", "--disable-gpu", "--no-sandbox" ]
         }
       }
     }
   }
}

Configuration

📅 Schedule: Branch creation - "" in timezone Europe/London, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Apr 1, 2026
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Apr 1, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
/opt/containerbase/tools/corepack/0.34.6/18.16.1/node_modules/corepack/dist/lib/corepack.cjs:22598
  const isURL = URL.canParse(range);
                    ^

TypeError: URL.canParse is not a function
    at parseSpec (/opt/containerbase/tools/corepack/0.34.6/18.16.1/node_modules/corepack/dist/lib/corepack.cjs:22598:21)
    at Object.getSpec (/opt/containerbase/tools/corepack/0.34.6/18.16.1/node_modules/corepack/dist/lib/corepack.cjs:22747:55)
    at Engine.findProjectSpec (/opt/containerbase/tools/corepack/0.34.6/18.16.1/node_modules/corepack/dist/lib/corepack.cjs:22965:31)
    at async Engine.executePackageManagerRequest (/opt/containerbase/tools/corepack/0.34.6/18.16.1/node_modules/corepack/dist/lib/corepack.cjs:23004:24)
    at async Object.runMain (/opt/containerbase/tools/corepack/0.34.6/18.16.1/node_modules/corepack/dist/lib/corepack.cjs:23710:7)

Node.js v18.16.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants