Skip to content

chore(deps): update monorepo:testcafe #127

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 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 22, 2021

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@testing-library/testcafe 4.3.1 -> 4.4.1 age adoption passing confidence
testcafe (source) 1.12.0 -> 1.20.1 age adoption passing confidence

Release Notes

testing-library/testcafe-testing-library (@​testing-library/testcafe)

v4.4.1

Compare Source

Bug Fixes
Reverts

v4.4.0

Compare Source

Features
DevExpress/testcafe (testcafe)

v1.20.1

Compare Source

Bug Fixes
  • Running 11 or more tests concurrently causes a memory leak (#​7188).
  • TestCafe cannot switch to iframes that descend from a shadowRoot element (#​3673).
  • TestCafe attempts to execute JSON files without fixture and test definitions (PR #​7187).
  • TestCafe incorrectly processes request hooks that return status code 500 (#​7213)

v1.20.0

Compare Source

⚠️
Warning: Impending breaking change.
TestCafe v1.20 is the final version of the framework to support TypeScript 3.
The next update will abandon TypeScript 3 in favor of TypeScript 4.

TestCafe v1.20.0 includes two major capabilities: an API testing toolkit and the ability to set a global test page URL. Additionally, TestCafe 1.20.0 introduces experimental support for Chrome User Flow Replays, as well as a number of under-the-hood improvements.

API Testing

TestCafe v1.20.0 includes a comprehensive set of server-side API testing tools. You can add dedicated API tests to your test suite, or include API testing methods in existing functional tests.

The new Request test action executes an HTTP request and returns the server's response.

const responseBody = await t.request(`http://localhost:3000/helloworld`).body;

t.expect(responseBody).contains('Hello World') // true

Read the API Testing Guide for a full overview of the framework's API testing capabilities.

Global starting URL

You can now define a single starting URL for all the tests in your test suite.

Declare the baseUrl in one of the following three ways:

Once you define a baseUrl, you can omit fixture and test URLs entirely, or define them relative to your baseUrl:

    "baseUrl": "https://devexpress.github.io/testcafe"
fixture`Test structure`
    .page`./example`; // starts at https://devexpress.github.io/testcafe/example
Experimental: Chrome User Flow Replays

TestCafe v1.20.0 introduces experimental, limited support for Google Chrome user flow recordings.

Record page actions in Google Chrome and export the recording as a JSON file. TestCafe will play the recording back just like it would a generate a test report

Read the User Flow Recordings guide to learn more.

Coming in TestCafe 2.0: TypeScript 4

The next version of TestCafe will adopt TypeScript 4 and lose compatibility with TypeScript 3.X.

To indicate the breaking change, we will increment the framework's major version number - from 1 to 2.

TestCafe 2.0 will be released later this month.

Improvements
  • Better Google Chrome video capture

    TestCafe v1.20.0 uses the Screen Capture API to record videos of Google Chrome test runs. This results in a significantly better test recording framerate and image quality.

    Screen capture comparison GIF

Bug Fixes
  • When the t.typeText action raises an error, TestCafe mistakenly awaits the target element for the second time (#​6623)

  • Concurrent test runs do not always generate concurrent test run reports (#​7062)

  • TestCafe doesn't properly handle errors raised inside the requestMock function (#​6703)

  • The default terminal viewport width is too low for non-tty terminals (Issue #​5919, PR #​6930 by @​PayBas)

  • TestCafe cannot switch to an invisible iframe (#​4558)

  • Update incorrect TypeScript definitions (PR #​7069 by @​karolnowinsky)

  • Some SVGs don't meet the visibility criteria (#​6998)

v1.19.0

Compare Source

TestCafe v1.19.0 introduces three major capabilities: a Cookie Management API, suite-wide test hooks, and suite-wide request hooks.

New Capabilities
Cookie Management

Previous versions of TestCafe lacked dedicated cookie management methods. Users had to write custom client functions to add and remove cookies. This technique was complicated and, at times, limiting. Some cookie manipulation actions --- such as HTTP-only cookie management --- were very hard to integrate into the test suite.

The latest version of the framework includes a proper set of cookie management tools that can handle a wide variety of tasks. Learn more about the new methods in our documentation: deleteCookies, getCookies, setCookies.

fixture('[API] Delete Cookies')
   .page('https://devexpress.github.io/testcafe/example/');

test('Should delete all the cookies with the specified url', async t => {
   // Set a cookie for the examples page.
   await t.setCookies({ name: 'apiCookie1', value: 'value1' });

   // Set a cookie for the 'thank you' page.
   await t.setCookies({
       name:  'apiCookie2',
       value: 'value2',
   }, 'https://devexpress.github.io/testcafe/example/thank-you.html');

   // Check the cookies.
   let cookies = await t.getCookies();

   await t
       .expect(cookies.length).eql(2)
       .expect(cookies[0]).contains({ name: 'apiCookie1', path: '/testcafe/example/' })
       .expect(cookies[1]).contains({ name: 'apiCookie2', path: '/testcafe/example/thank-you.html' });

    // Delete cookies from the 'thank you' page.
    await t.deleteCookies({ domain: 'devexpress.github.io', path: '/testcafe/example/thank-you.html' });

    // Check the cookies.
    cookies = await t.getCookies();

    await t
        .expect(cookies.length).eql(1)
        .expect(cookies[0]).contains({ name: 'apiCookie1', path: '/testcafe/example/' });
});
Global Test Hooks

Many TestCafe users employ test hooks --- functions that run before and after tests and fixtures. In TestCafe v1.19.0 and higher, you can attach hooks to test runs, as well as apply test hooks to your entire suite. This capability requires the use of a JavaScript configuration file.

Learn more about hooks from our newly updated hook guide.

Global Request Hooks

Request hooks are functions that intercept HTTP requests and mock HTTP responses. Earlier versions of TestCafe let you attach request hooks to one test or fixture at a time. You can now define global request hooks and attach them to multiple tests or fixtures in your suite.

Read the Request Hooks guide to learn more.

Bug Fixes

v1.18.6

Compare Source

Bug Fixes

v1.18.5

Compare Source

Bug Fixes
  • The t.scrollIntoView method causes the "Element is not visible" error when the target's overflow property is hidden (#​6601)

  • TestCafe triggers click events for label elements even when the input is disabled (#​6949)

  • TestCafe hangs when you change the active window between two consecutive assertions (#​6037)

  • TestCafe cannot take screenshots when using the LambdaTest browser provider (#​6887)

  • Pages that target a missing <iframe>(testcafe-hammerhead/#​2178 element with the Element.focus method yield a ""TypeError: window.location.toString is not a function" error.

  • TestCafe causes errors when it encounters XMLHTTPRequest calls that fetch resources from blob: URLs (testcafe-hammerhead/#​2634)

  • HTMLElement.removeAttributeNode method calls yield unjustified exceptions (PR testcafe-hammerhead/#​2742 by @​TrevorKarjanis)

v1.18.4

Compare Source

Bug Fixes

v1.18.3

Compare Source

Bug Fixes
  • The nanoid package is vulnerable to CVE-2021-23566 (#​6826)
  • The Selector.visibility property does not depend on the parent elements' visibility (#​3495)

v1.18.2

Compare Source

Bug Fixes
  • Tests with client scripts yield the "Cannot read property 'tests' of null" error (#​6305)
  • TestCafe hangs after failing to initialize a Role (#​5278)
  • Testcafe falsely detects filter directives in the configuration file (#​6620)
  • Concurrent Chrome instances cannot reconnect to TestCafe after a restart (#​4554)
  • TestCafe hangs if a user enters an iframe and then switches to a different browser window (#​6085)
  • TestCafe opens incorrect URLs when you concurrently run multiple fixtures from the same test file (#​6041)
  • TestCafe expands disabled <select> elements (#​5616)
  • TestCafe does not load some cross-domain iframes (#​6633)
  • TestCafe incorrectly sets the Document.referrer property in Chrome 89 (#​6144)
  • Tests hang when the test page initiates a file download (#​5796)
  • Requests fail because TestCafe incorrectly handles dynamic content security policy (#​6057)
  • TestCafe triggers pointerdown event handlers twice (#​5891)
  • TestCafe cannot trigger click event handlers for Angular buttons with the "disabled" attribute (#​5240)

v1.18.1

Compare Source

macOS Bug Fix

TestCafe fails to launch Safari after the v1.18.0 update.

v1.18.0

Compare Source

TestCafe v1.18.0 includes a new experimental Selector debugging capability, important improvements for macOS users and a number of routine bug fixes.

If you run TestCafe on macOS, follow the Upgrade Guide to make sure your upgrade goes smoothly.

New Debugging Capabilities (Experimental)

If you launch TestCafe with the --experimental-debug flag, you can debug Selectors and Client Functions in the Watch panel of a Node.js debugger.

macOS improvements
TestCafe Browser Tools on Apple Silicon

The TestCafe Browser Tools package is a communication layer that automates browsers on behalf of TestCafe. Both the TestCafe framework and TestCafe Studio include the TestCafe Browser Tools binary.

Earlier versions of TestCafe Browser Tools were optimized for the x86-64 architecture. Apple Silicon Macs ran those binaries through the Rosetta 2 translation layer. Rosetta 2 took up additional space and prevented TestCafe from taking full advantage of the processor.

TestCafe v1.18.0 includes a Universal TestCafe Browser Tools binary that runs natively on both x64 Macs and Apple Silicon Macs.

Follow the Upgrade Instructions to make sure your version of TestCafe Browser Tools is up to date.

TestCafe Browser Tools macOS Permission Fix

The TestCafe Browser Tools binary requires special privileges to automate browsers and take screenshots. Security improvements in recent versions of macOS made these privileges harder to obtain.

Prior to TestCafe v1.18.0, each installation of TestCafe and TestCafe Studio included a TestCafe Browser Tools binary. macOS users with multiple sets of TestCafe Browser Tools had to go through a lengthy process to obtain the necessary permissions.

TestCafe v1.18.0 and TestCafe Studio v1.7 address this issue. Beginning with this version, all TestCafe installations share a single TestCafe Browser Tools binary. TestCafe stores this binary in the user's Home directory, inside the hidden ~/.testcafe-browser-tools folder.

Follow the Upgrade Instructions to reset TestCafe Browser Tools' permissions and enable the new binary.

Bug Fixes
  • TestCafe immediately closes new windows (#​6680)
  • Tests fail with the TypeError: Invalid value used as weak map key. error (#​6563)
  • The latest version of the TestCafe Docker image cannot connect to Chrome and Chromium (#​6436)
  • TestCafe loses test error call stack and outputs the following message instead: "Uncaught object "[object Object]" (Issue #​6624. Discovered by @​danieltroger, PR by @​rob4629.)
  • Lack of definitions for two new timeout options results in TypeScript compilation errors (#​6713)
  • TypeScript filter functions erroneously require a Promise return value (#​6705)

v1.17.1

Compare Source

Bug Fixes
  • TestCafe incorrectly reads the 'reporter' configuration file option (#​6665, #​6594).
  • An error report displays multiple warnings when you debug a test in headless mode (#​6605).
  • The testcafe-hammerhead proxy fails to load a web page (testcafe-hammerhead/#​2708).

v1.17.0

Compare Source

Enhancements
Global Test and Fixture Hooks

You can now specify global test and fixture hooks. TestCafe attaches these hooks to every test / fixture in the test suite.

module.exports = {
    hooks: {
        fixture: {
            before: async (ctx) => {
                // your code
            },
            after: async (ctx) => {
                // your code
            }
        },
        test: {
            before: async (t) => {
                // your code
            },
            after: async (t) => {
                // your code
            }
        }
    }
};
Execution Timeouts

You can now specify custom timeouts for tests and test runs. If a test/test run is idle or unresponsive for the specified length of time, TestCafe terminates it. Specify these timeouts in the configuration file or from the command line.

Command line interface

testcafe chrome my-tests --test-execution-timeout 180000
testcafe chrome my-tests --run-execution-timeout 180000

Configuration file

{
    "runExecutionTimeout": 180000,
    "testExecutionTimeout": 180000
}
Bug Fixes
  • TestCafe fails to continue the test after the user downloads a file. (#​6242).
  • The TestCafe proxy does not fire the "unpipe" event when necessary. This omission leads to the "This socket has been ended by the other party" error (#​6558).
  • TestCafe incorrectly handles rewritten uninitialized iframes (testcafe-hammerhead/#​2694, testcafe-hammerhead/#​2693).

v1.16.1

Compare Source

Bug Fixes
  • Incorrect handling of the beforeInput Firefox event (#​6504)
  • Incorrect handling of page styles leads to test failure in Safari 15 (#​6546)
  • Incorrect stylesheet filtering procedure leads to client-side errors in IE11 (#​6439)

v1.16.0

Compare Source

Enhancements
Support for JavaScript configuration files

You can now store TestCafe settings in a js file. Configuration properties in JavaScript files can reference JavaScript methods, functions and variables, which makes it easy to create dynamic configuration files.

Just export the JSON name/value pairs in the file:

module.exports = {
    skipJsErrors: true,
    hostname: "localhost",
    // other settings
}
Support for custom user variables in the configuration file

TestCafe v1.16.0 and later supports configuration files with variable declarations. Users can reference variables from a configuration file in the tests that utilize that configuration file. To enable access to configuration file variables, import the userVariables object from the testcafe module at the beginning of the test script.

This capability can come in handy if there's a single piece of data you want to use in multiple tests — for example, the website's URL. That way, if your website moves to a new domain name, you don't have to change your tests one by one.

If you previously used environment variables to achieve the same goal, you might prefer the new method — it significantly simplifies the setup process, and allows you to commit the data to a version control system.

Define your custom variables with the userVariables JSON object:

{
  "userVariables": {
    "url": "http://devexpress.github.io/testcafe/example",
  }
}

Reference this variable in your test:

import { userVariables } from 'testcafe';

fixture `Test user variables`
    .page(userVariables.url);

test('Type text', async t => {
    await t
        .typeText('#developer-name', 'John Smith')
        .click('#submit-button');
});
Other enhancements
  • New option that disables thumbnail generation for test screenshots (PR by @​taki-fw).
  • New embedding-utils API method that retrieves information about skipped tests (PR by @​flora8984461).
  • The Runner.filter function supports asynchronous arguments (PR by @​eignatyev).
  • You can import the test and fixture objects directly from the testcafe module (PR #​6338).
Bug Fixes
  • TestCafe does not keep track of file changes in live mode (#​6481).

v1.15.3

Compare Source

Bug Fixes

v1.15.2

Compare Source

Bug Fixes

v1.15.1

Compare Source

Bug Fixes
  • The Element.getAttribute method returns an incorrect value (#​5984).
  • TestCafe test fails when you forget to include the await keyword before the assertion statement (#​4613).
  • TestCafe fails to focus an element inside a shadow DOM (#​4988).
  • TestCafe fails to focus SVG elements (#​6262).
  • TestCafe raises the blur event when you focus a non-focusable element (#​6236).
  • TestCafe test hangs when you click a link within a cross-domain iframe (#​6331).
  • TestCafe loads the Babel compiler libraries multiple times (#​6310).
  • TestCafe incorrectly parses the meta refresh tags (PR testcafe-hammerhead/#​2663)
  • TestCafe incorrectly processes iframe elements with the "srcdoc" attribute (testcafe-hammerhead/#​2647).
  • TestCafe incorrectly specifies the Referer HTTP request header if you use the "navigateTo" action (testcafe-hammerhead/#​2607).
  • An error related to the bug in Node.js occurs (testcafe-hammerhead/#​2655).

v1.15.0

Compare Source

Enhancements
Dispatch DOM events (PR #​6103)
t.dispatchEvent(target, eventName[, options])

The t.dispatchEvent method lets you interact with the page in ways that TestCafe does not support out of the box. To implement an unsupported user action, break it down into discrete DOM events, and use the t.dispatchEvent method to fire them.

Internet Explorer does not support event constructors. As such, TestCafe cannot dispatch DOM events in this browser.

The following example fires a touchstart action on an element with the 'button' id:

await t.dispatchEvent('#button', 'touchstart',  { eventConstructor: 'TouchEvent' });

Read the Custom Actions Guide for more information on DOM events and event constructors.

Quarantine mode customization (PR #​6073 by @​rob4629)

New settings are available in quarantine mode. Quarantine mode repeats failing tests to help users get conclusive test results in sub-optimal conditions. TestCafe v1.15 adds two variables - successThreshold and attemptLimit - that allow you specify when TestCafe must stop.

The attemptLimit variable determines the maximum possible number of test attempts.
The successThreshold variable determines the number of successful attempts necessary for the test to pass.

testcafe chrome ./tests/ -q attemptLimit=5, successThreshold=2
Password obfuscation (#​6014)

TestCafe reporters no longer receive the contents of password input fields, unless you explicitly specify otherwise. This improves security for users that store their test results online.

Support for non-HTML documents (#​1471)

TestCafe now has the capability to proxy non-HTML documents such as XML and text files. Tests no longer hang upon redirection to a non-HTML address.

Bug Fixes

v1.14.2

Compare Source

v1.14.1

Compare Source

v1.14.0

Compare Source

v1.13.0

Compare Source

This release adds support for custom paths to the configuration file, support for Microsoft Edge on Linux systems, and multiple bugfixes.

Enhancements
⚙️ Specify Custom Path to the TestCafe Configuration File (PR #​6035 by @​Chris-Greaves)

TestCafe now allows you to specify a custom configuration file path.

To set this path, use one of the following options:

Add Support for Microsoft Edge on Linux (PR testcafe-browser-tools/#​210 by @​dcsaszar)

If you follow the Microsoft Edge Insider Channels for Linux and have Microsoft Edge installed on your Linux machine, you can now launch TestCafe tests in this browser.

testcafe edge tests/test.js
⚙️ Deprecated the t.setPageLoadTimeout method (PR #​5979)

Starting with v1.13.0, the t.setPageLoadTimeout method is deprecated. To set the page load timeout, use the new test.timeouts method.

fixture`Setting Timeouts`
    .page`http://devexpress.github.io/testcafe/example`;

test
    .timeouts({
        pageLoadTimeout: 2000
    })
    ('My test', async t => {
        //test actions
    })

You can also use test.timeouts to set the pageRequestTimeout and ajaxRequestTimeout.

fixture`Setting Timeouts`
    .page`http://devexpress.github.io/testcafe/example`;

test
    .timeouts({
        pageLoadTimeout:    2000,
        pageRequestTimeout: 60000,
        ajaxRequestTimeout: 60000
    })
    ('My test', async t => {
        //test actions
    })
Bug Fixes
  • Fixed a bug where TestCafe would sometimes be unable to trigger a hover event on a radio element (#​5916)
  • Fixed a bug where TestCafe was unable to register a Service Worker due to the wrong currentScope calculation inside a Window.postMessage call (testcafe-hammerhead/#​2524)
  • RequestLogger now shows a correct protocol for WebSocket requests (testcafe-hammerhead/#​2591)
  • Test execution now pauses when the browser window is in the background (testcafe-browser-tools/#​158)
  • TestCafe now appends an extension to screenshot filenames (#​5103)
  • Fixed a bug where TestCafe would emit test action events after the end of a test run (#​5650)
  • TestCafe now closes if the No tests to run error occurs in Live mode (#​4257)
  • Fixed a freeze that happened when you run a test suite with skipped tests (#​4967)
  • Fixed an error where a documentElement.transform.translate call moved the TestCafe UI in the browser window (#​5606)
  • TestCafe now emits a warning if you pass an unawaited selector to an assertion (#​5554)
  • Fixed a crash that sometimes occurred in Chrome v85 and earlier on pages with scripts (PR testcafe-hammerhead/#​2590)

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 is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • 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 automerge dependencies Pull requests that update a dependency file labels Mar 22, 2021
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from b42295f to 2c9f6c4 Compare April 7, 2021 15:19
@renovate renovate bot changed the title chore(deps): update dependency testcafe to v1.13.0 chore(deps): update dependency testcafe to v1.14.0 Apr 7, 2021
@codecov-io
Copy link

codecov-io commented Apr 7, 2021

Codecov Report

Merging #127 (891b38c) into master (ade7907) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #127   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines           30        30           
  Branches         1         1           
=========================================
  Hits            30        30           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ade7907...891b38c. Read the comment docs.

@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from 2c9f6c4 to c889823 Compare April 10, 2021 04:06
@renovate renovate bot changed the title chore(deps): update dependency testcafe to v1.14.0 chore(deps): update monorepo:testcafe Apr 10, 2021
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from c889823 to 891b38c Compare April 10, 2021 11:23
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from 891b38c to f19bb4b Compare May 12, 2021 16:43
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2021

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (cd89473) compared to base (dd24bbc).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #127   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines           30        30           
  Branches         1         1           
=========================================
  Hits            30        30           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch 2 times, most recently from 846ec07 to 0c789d5 Compare May 17, 2021 04:58
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from 0c789d5 to fde4222 Compare June 7, 2021 07:31
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from fde4222 to ee5e622 Compare July 8, 2021 16:20
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from ee5e622 to 03ea103 Compare July 28, 2021 12:59
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from 03ea103 to 82804f2 Compare October 18, 2021 18:38
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from 82804f2 to d4f9f36 Compare March 7, 2022 13:28
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from d4f9f36 to f0d9363 Compare April 25, 2022 01:26
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from f0d9363 to babd6e1 Compare June 18, 2022 13:23
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from babd6e1 to 7d355cf Compare September 25, 2022 15:19
@renovate renovate bot force-pushed the renovate/monorepo-testcafe branch from 7d355cf to cd89473 Compare November 20, 2022 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants