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

An in-range update of testcafe is breaking the build 🚨 #12

Closed
greenkeeper bot opened this issue Aug 8, 2019 · 1 comment
Closed

An in-range update of testcafe is breaking the build 🚨 #12

greenkeeper bot opened this issue Aug 8, 2019 · 1 comment

Comments

@greenkeeper
Copy link
Contributor

greenkeeper bot commented Aug 8, 2019

The devDependency testcafe was updated from 1.3.3 to 1.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

testcafe is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Release Notes for v1.4.0

v1.4.0 (2019-8-7)

Enhancements

⚙️ Inject Scripts Into Tested Pages (#1739)

TestCafe now allows you to inject scripts into pages visited during the tests. Use this feature to add helper functions, mock browser API or import modules.

To add client scripts to all tests, specify them in the command line, API or configuration file. Use the following options:

  • the --cs (--client-scripts) command line argument

    testcafe chrome test.js --client-scripts=mockDate.js,assets/react-helpers.js
  • the runner.clientScripts API method

    runner.clientScripts('mockDate.js', 'scripts/react-helpers.js');
  • the clientScripts configuration file property

    {
        "clientScripts": ["mockDate.js", "scripts/react-helpers.js"]
    }

If you need to add scripts to individual fixtures or tests, use the fixture.clientScripts and test.clientScripts methods in test code.

fixture `My fixture`
    .page `http://example.com`
    .clientScripts('mockDate.js', 'scripts/react-helpers.js');
test
    ('My test', async t => { /* ... */ })
    .clientScripts('mockDate.js', 'scripts/react-helpers.js');

TestCafe also allows you to inject scripts into specific pages.

fixture `My fixture`
    .clientScripts({
        page: 'https://myapp.com/page/',
        path: 'scripts/vue-helpers.js'
    });

This is helpful when you need to override the browser API on particular pages and use the default behavior everywhere else.

You can specify the scripts to inject as follows:

  • pass the path to a JavaScript file to inject its content:

    fixture `My fixture`
        .clientScripts({ path: 'assets/jquery.js' });
  • use the module name to inject a module:

    fixture `My fixture`
        .clientScripts({ module: 'async' });

    TestCafe searches for the module's entry point with Node.js mechanisms and injects its content. Note that the browser must be able to execute this module.

  • pass the code you need to inject:

    fixture `My fixture`
        .clientScripts({ content: 'Geolocation.prototype.getCurrentPosition = () => new Positon(0, 0);' });

For more information, see Inject Scripts into Tested Pages.

Bug Fixes

  • The browser no longer displays 404 errors after the test submits a form (#3560
  • TestCafe can now download files when testing in headless mode (#3127)
  • TypeScript no longer throws an error when fixture or fixture.page uses a tag function (#4042)
  • The load event now correctly fires for cached images (testcafe-hammerhead/#1959)
  • TestCafe can now read resources from asar archives (testcafe-hammerhead/#2033)
  • Fixed a bug when testcafe-hammerhead event listeners were called twice (testcafe-hammerhead/#2062)
Commits

The new version differs by 30 commits.

  • 0963882 Bump version (v1.4.0) (#4125)
  • 8b06a8e [docs] Add changelog for v1.4.0 (#4097)
  • 5e7cdc9 [docs] Change the date in the v1.4.0 announcement
  • 60d856f Bump version (v1.4.0-rc.3) (#4114)
  • e338022 [docs] Typo
  • 475bbe1 [docs] Add a bugfix to the 1.4.0 announcement and fix headers
  • 374cae7 [docs] Add new contributors to readme (#4113)
  • 8339495 [docs] Fix linter
  • bbad170 [docs] Add script injection API to the A-Z index
  • ef5e6b4 [docs] Change date in the v1.4.0 announcement
  • 74b3322 [docs] Enhancements for client scripts (#4110)
  • 837d176 [docs] Fix selector and client function examples (#3855)
  • 5cfb226 Fix outdated info (#4098)
  • 6001c9f Remove the Twitter section (#4109)
  • 7d32524 Bump version (v1.4.0-rc.2); Bump hh (v14.7.2); Prevent form.submit (fix #3560) (#4077)

There are 30 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

@Skerwe
Copy link
Owner

Skerwe commented Aug 27, 2019

Updated peer and missing dependencies.

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

No branches or pull requests

1 participant