Skip to content
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

Update dependency codeceptjs to v3.7.2 #1097

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 12, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
codeceptjs (source) 3.6.7 -> 3.7.2 age adoption passing confidence

Release Notes

Codeception/codeceptjs (codeceptjs)

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:

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":"[email protected]","password": "****"}
      I send post request "https://localhost:8000/login", {"username":"[email protected]","password": "****"}
      › [Request] {"baseURL":"https://localhost:8000/login","method":"POST","data":{"username":"[email protected]","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


Configuration

📅 Schedule: Branch creation - "after 7am and before 11am every weekday" in timezone Europe/London, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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 Feb 12, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Feb 12, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Feb 12, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Feb 13, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Feb 13, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Feb 14, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Feb 14, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Feb 14, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Feb 14, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Feb 14, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Feb 14, 2025
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z bot requested a deployment to preview February 14, 2025 21:30 Abandoned
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x-lockfile branch from e87ce23 to 241279d Compare February 17, 2025 14:08
renovate-approve[bot]
renovate-approve bot previously approved these changes Feb 17, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Feb 17, 2025
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z bot requested a deployment to preview February 17, 2025 14:17 Abandoned
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x-lockfile branch from 241279d to 850021d Compare February 17, 2025 16:54
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x-lockfile branch 2 times, most recently from c4d0fcb to 6038953 Compare February 19, 2025 15:59
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x-lockfile branch from 6038953 to 379b02c Compare February 20, 2025 14:09
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Feb 20, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Feb 20, 2025
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x-lockfile branch from 379b02c to 0f6210f Compare February 20, 2025 17:24
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