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 testcafe to v2 #830

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 15, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
testcafe (source) ^1.3.3 -> ^2.0.0 age adoption passing confidence

Release Notes

DevExpress/testcafe

v2.4.0

Compare Source

TestCafe v2.4.0 introduces the Visual Selector Debugger. You can now create and debug Selector queries in the browser window.

Visual Selector Debugger

TestCafe v2.4.0 displays the Visual Selector Debugger panel when you activate Debug Mode. Use the panel to debug Selector queries from your test, or generate new Selector queries.

If a Selector query causes your test to fail, add the t.debug() command after the last successful action, and launch the test.

When the test reaches the breakpoint, the window that runs the test displays the Selector Debugger panel. Copy the failing Selector query from test code to the Selector Debugger input field.

  • TestCafe highlights page elements that match the Selector query.
  • If no elements match the Selector query, the panel displays the No Matching Elements warning.
  • If your Selector query contians a syntax error, the panel displays the Invalid Selector warning.

To interactively generate a Selector query, click the Pick button, and select the target element on the page.

For more information on the panel, its capabilities, and limitations, read the Visual Selector Debugger Guide.

Bug Fixes

v2.3.1

Compare Source

TestCafe v2.3.1 introduces a number of bug fixes.

Bug Fixes
  • Client-side code with optional chaining may trigger a TestCafe error (#​7387).
  • TestCafe cannot interact with images from the Shadow DOM (#​7454).
  • TestCafe v2.3.0 fails to launch when the test.meta method precedes test code (#​7482).
  • When TestCafe launches a headless instance of Google Chrome in proxyless mode, it cannot interact with elements that are overlapped by the status bar (#​7483).

v2.3.0

Compare Source

TestCafe v2.3.0 introduces create-testcafe --- an interactive tool that allows you to initialize a new TestCafe project in seconds. The update also includes experimental ECMAScript module support and a number of bug fixes.

IMPORTANT:
TestCafe v2.3.0 ends support for Node.js 14 due to a known vulnerability in the babel-plugin-module-resolver module.

Install an up-to-date version of the Node.js runtime to use TestCafe v2.3.0 and up.

The official maintenance period for Node.js 14 elapses on April 1st, 2023.

create-testcafe

Use the create-testcafe tool to initialize a new TestCafe project, or add TestCafe to an existing Node.js application.

Execute the following command to launch create-testcafe:

npx create-testcafe

example

The create-testcafe tool allows you to perform the following actions with a single command:

  1. Create a new folder for the TestCafe project (optional).
  2. Create a new local installation of TestCafe and its dependencies.
  3. Create and initialize a TestCafe configuration file.
  4. Create a separate subfolder for tests.
  5. Populate the test folder with test examples (optional).
  6. Create a YAML file with a GitLab Actions workflow that runs TestCafe tests (optional).

Read the TestCafe Setup Wizard guide for more information on the create-testcafe tool.

Experimental: ECMAScript module support

IMPORTANT:
ESM module suppport works with Node.js 16 and up.

TestCafe has always used CommonJS syntax for module imports:

const { x } = require('y');

An increasing number of Node.JS packages abandon CommonJS in favour of ECMAScript module syntax:

import {x} from 'y'

Enable the --experimental-esm CLI flag to import modules that do not support CommonJS. Note: tests with ECMASCript module syntax are subject to additional requirements.

testcafe chrome test.js --experimental-esm
Additional Reuqirements

To run tests with ECMAScript import statements, make sure that your project meets at least one of the following requirements:

  1. The value of the type key in your project's package.json file is module.
  2. The test files in your project use the .mjs extension.
Bug Fixes
  • TestCafe doesn't delete expired cookies (#​7432).
  • TestCafe cannot handle windows that appear when the user clicks a link with a _blank target (#​6926).
  • TestCafe fails to start because it triggers the dns.setDefaultResultOrder method in older Node.js environments (#​7447).
  • TestCafe depends on a vulnerable, outdated version of the babel-plugin-module-resolver package (#​7456).

v2.2.0

Compare Source

TestCafe v2.2.0 introduces user-defined custom actions and an important experimental capability. Google Chrome users can now enable "proxyless mode" to speed up their test suite.

Custom Action Support

TestCafe users can now define custom test actions. Place the definition function in a JavaScript configuration file:

module.exports = {
  customActions: {
   async makeCoffee (args) {
        await this.click(args);
    }, 
  }
};

Include custom methods in your tests alongside other TestController methods.
Add the customActions prefix when you call the action:

test('Test with a custom action', async t => {
    await t.click()
        .customActions.makeCoffee()
        .click();
})
Experimental: Proxyless mode

TestCafe runs an under-the-hood reverse proxy to automate tests across different browsers. But this technique complicates the framework. Native automation protocols offer superior automation speeds and greater stability. That's why the TestCafe team decided to gradually phase the reverse proxy out in favor of native support for these automation protocols.

TestCafe v2.2.0 includes an experimental option that disables the proxy for Google Chrome.

testcafe chrome tests --experimental-proxyless

You can enable this option in the command line interface, the Test Runner API, and the configuration file. Read the Proxyless mode guide for more information.

Bug Fixes
  • TestCafe doesn't hide the live mode status bar when the bar obstructs the action target (#​7384)
  • The 'Target element is overlapped' message does not reference the Selector that caused the warning (#​7386)
  • The TestCafe Dashboard reporter includes an outdated uuid dependency (testcafe-reporter-dashboard#​111)
  • TestCafe doesn't display the correct error message when the framework throws an exception (#​6936)
  • TestCafe retains some cookies after the user requests their deletion (PR testcafe-hammerhead#​2818)
  • TestCafe cannot load test pages with the localhost URL on Node.js v17 and up (#​7396)
  • TestCafe cannot take screenshots in headless Chrome on Node.js v17 and up (#​7408)
  • Web workers that originate from Blob URLs throw an error when they call the importScript function (#​7378)
  • TestCafe doesn't set the correct Request header when an iframe points the user to a new URL (#​7376, PR testcafe-hammerhead#​2813 by @​naggingant)
  • TestCafe cannot interact with options that belong to a <select> element with the multiple attribute (PR testcafe-hammerhead#​2815)

v2.1.0

Compare Source

Improvements
Improved handling of invisible elements
  • Visibility criteria update: TestCafe no longer interacts with elements that have the visibility: collapse attribute.
  • If the action target does not fit the visibility criteria, TestCafe outputs an error message that references the exact reason. (#​7310).
Improved handling of overlapped elements
  • When another element overlaps the center of the action target, TestCafe scans the target element for available points of contact. If the selector timeout ends before TestCafe finds an unobstructed point, TestCafe outputs a warning message and interacts with the topmost element at the center of the original target (#​7309).
  • TestCafe v2.1.0 contains an improved algorithm that detects whether extra scrolling can resolve an element obstruction issue. (#​6208)
Bug Fixes
  • In some environments, TestCafe cannot take screenshots when the test runs in a headless Chromium-based browser (#​7224).
  • Full-page screenshots in headless Chrome do not include the edges of the page (#​5961).
  • TestCafe throws the "TypeError: Illegal invocation" error when the front-end code passes a number value to the Element.insertAdjacentText method (#​7352).

v2.0.2

Compare Source

Bug Fixes
  • TestCafe doesn't include the flags necessary to launch Chrome in a Podman container (PR #​7307 by @​timnederhoff)
  • TestCafe doesn't warn users when it interacts with an element that obstructs the original action target (#​2930)
  • TestCafe incorrectly parses regular expressions passed to the --skip-js-errors CLI flag (#​7301)

v2.0.1

Compare Source

Bug Fixes
  • TestCafe yields incomplete video recordings in concurrency mode (#​7218).
  • Video recordings in concurrency mode yield EPIPE errors that cause crashes (#​7216).
  • Running TestCafe 1.20.1 and up with a high concurrency factor may nonetheless result in a MaxListenersExceededWarning warning (#​7188).

v2.0.0

Compare Source

TypeScript update

⚠️
TestCafe 2.0 includes a breaking change.
The framework’s built-in TypeScript compiler has been updated from version 3.9 to version 4.7. The vast majority of TestCafe users should not experience any issues during the upgrade. However, since TypeScript does not follow the semver versioning policy, even minor TypeScript updates contain breaking changes. Some TypeScript users may need to perform additional actions to ensure the compatibility of their test code.

Read the TestCafe 2.0 Migration Guide to learn more.

Improvement: New ways to ignore JavaScript errors

TestCafe v2.0 introduces new ways to ignore JavaScript errors during test runs.

Two new methods allow you to ignore errors on a per-test or a per-fixture basis.

  • Use the test.skipJsErrors method to ignore JavaScript errors in specific tests.
  • Use the fixture.skipJsErrors method to ignore JavaScript errors for specific fixtures.
  • The t.skipJsErrors action lets you ignore JavaScript errors at specific points in the test.

For each of the methods above, you can define the following options:

  • The pageUrl option filters errors by page URL.
  • The message option filters errors by message.
  • The stack option filters errors by call stack.

Read the Skip JavaScript Errors recipe to learn more.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

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

Rebasing: Whenever PR becomes conflicted, 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 has been generated by Mend Renovate. View repository job log here.

@amihajlovski amihajlovski changed the base branch from develop to fix/dependency-updates March 15, 2023 09:09
@amihajlovski amihajlovski changed the base branch from fix/dependency-updates to bugfix/dependency-updates March 15, 2023 09:26
@amihajlovski amihajlovski merged commit 035e2ef into bugfix/dependency-updates Mar 15, 2023
@amihajlovski amihajlovski deleted the renovate/testcafe-2.x branch March 15, 2023 09:26
amihajlovski added a commit that referenced this pull request Mar 16, 2023
* Update dependency glob-parent to v6 (#798)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency minimist to v1.2.8 (#820)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: 2 critical vulnerabilities by audit fix

* Update dependency stylelint to v15 (#828)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Aleksandar Mihajlovski <aleksandar.mihajlovski@adyen.com>

* Update dependency testcafe to v2 (#830)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: upgrade syle-loader dep

* Update dependency proxyquire to v2 (#822)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: sinon version

* fix: minimatch latest version

* fix: resolve url loader

* fix: prettier eslint version

* Update github/codeql-action action to v2 (#861)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: yargs package

* fix: all vulnerabilities using npm package force resolutions

* fix: removed unused test folder

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

None yet

1 participant