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

chore(deps): update dependency codeceptjs to v3.7.2 #4019

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 10, 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":"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


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 Jan 10, 2025
@renovate renovate bot enabled auto-merge (squash) January 10, 2025 09:20
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Jan 10, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Jan 10, 2025
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from 1b7bfa4 to ca4e9d8 Compare January 10, 2025 09:58
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from ca4e9d8 to 7d0e52d Compare January 10, 2025 10:39
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from 7d0e52d to cecb6c1 Compare January 10, 2025 11:25
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from cecb6c1 to 395e508 Compare January 10, 2025 12:02
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from 395e508 to b332f53 Compare January 10, 2025 12:39
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from b332f53 to f2a9f57 Compare January 10, 2025 13:18
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from f2a9f57 to 15696d1 Compare January 10, 2025 13:57
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from 15696d1 to 616ce21 Compare January 13, 2025 09:23
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from 616ce21 to 052f6b6 Compare January 13, 2025 10:04
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from 052f6b6 to 25201aa Compare January 13, 2025 10:45
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from 25201aa to 2d53f37 Compare January 13, 2025 11:25
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Mar 3, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Mar 3, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Mar 3, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Mar 3, 2025
renovate-approve[bot]
renovate-approve bot previously approved these changes Mar 3, 2025
renovate-approve-2[bot]
renovate-approve-2 bot previously approved these changes Mar 3, 2025
@renovate renovate bot force-pushed the renovate/codeceptjs-3.x branch from a9916e5 to 8093bb2 Compare March 3, 2025 12:11
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