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 nightwatch to v3 #153

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

Conversation

mend-for-github-com[bot]
Copy link

@mend-for-github-com mend-for-github-com bot commented Sep 29, 2023

This PR contains the following updates:

Package Type Update Change
nightwatch (source) devDependencies major ^1.6.4 -> ^3.0.0

By merging this PR, the below issues will be automatically resolved and closed:

Severity CVSS Score CVE GitHub Issue
Critical 9.8 CVE-2021-23406 #88
Critical 9.8 CVE-2021-23406 #88
Critical 9.8 CVE-2022-29078 #106
Critical 9.8 CVE-2023-42282 #172
High 7.5 CVE-2021-3807 #92
High 7.5 WS-2021-0638 #120

Release Notes

nightwatchjs/nightwatch (nightwatch)

v3.1.3

Compare Source

What's Changed

New Contributors

Full Changelog: nightwatchjs/nightwatch@v3.1.2...v3.1.3

v3.1.2

Compare Source

v3.1.1

Compare Source

v3.1.0

Compare Source

We’re super excited to announce the release of Nightwatch v3. It that has been built around these three pillars:

  • Developer Experience: The entire experience from getting started, to writing and debugging tests, has been redesigned for speed, stability, and consistent non-flaky results.

  • Mobile first: Test your web or native, iOS and Android, mobile applications on simulators, real mobile devices or a cloud grid like BrowserStack.

  • One test automation framework: Run all types of tests from unit, component, and E2E to API, visual, and accessibility with a single framework.

What's Changed

New Features
Fixes
TypeScript Fixes
Dependency Updates
Cucumber
General

New Contributors

Full Changelog: nightwatchjs/nightwatch@v3.0.1...v3.1.0

v3.0.1

Compare Source

We’re super excited to announce the release of Nightwatch v3. It that has been built around these three pillars:

  • Developer Experience: The entire experience from getting started, to writing and debugging tests, has been redesigned for speed, stability, and consistent non-flaky results.

  • Mobile first: Test your web or native, iOS and Android, mobile applications on simulators, real mobile devices or a cloud grid like BrowserStack.

  • One test automation framework: Run all types of tests from unit, component, and E2E to API, visual, and accessibility with a single framework.

New features

New element APIs

With Nightwatch v3, we have revamped the element API to make test authoring simpler and more concise. Learn more
More rich & powerful selectors

New selectors are introduced as part of this latest versions

.findByText()

.findByPlaceholderText()

.findByAltText()

.findByRole()

You can also chain selectors to find elements that are more complex to find

For E.g.

browser.element.find('CSS Selector').findByText('text').click();

Guide

Performance improvements

Nightwatch v3 has implemented worker threads for parallel runs and we have observed improvements of up to 25% between Nightwatch v2 & v3. Try it now

Nightwatch inspector

Nightwatch v3 introduces a point and click tool that can help you easily find selectors. It will improve your productivity of authoring tests & help you find durable selectors for lower long term maintenance. Learn more

Angular component testing

With Nightwatch v3 you can test Angular components in isolation by mounting them in the browser. Try it now

Test doubles

The unit testing with Nightwatch got an upgrade as v3 introduced test doubles. You can use mocks, stubs & spies in your Nightwatch tests.

Fixes

Other Improvements

Breaking changes

We have tried to ensure that there are no breaking changes while upgrading to v3. However, in case you need migration assistance please reach out to us on our new Nightwatch v3 channel on Discord

v3.0.0

Compare Source

v2.6.25

Compare Source

v2.6.24

Compare Source

v2.6.23

Compare Source

What's Changed

Full Changelog: nightwatchjs/nightwatch@v2.6.22...v2.6.23

v2.6.22

Compare Source

What's Changed

Full Changelog: nightwatchjs/nightwatch@v2.6.21...v2.6.22

v2.6.21

Compare Source

What's Changed

  • Return correct status code for waitForElementNotPresent (#​3678)
  • skipped tests have categorized as either user-marked or runtime-failed (#​3711)
  • REPL interface exits on error or failed expect assertion.
  • Added rerun functionality for failed test (#​3703)
  • Added describe name, hook timestamps to reporter (#​3680)
  • feat/retry-data: Added retry test data to global reporter (#​3712)
  • Always throw uncaught exceptions (#​3708)
  • Added a fix for assert.hasAttribute (#​3651)

Full Changelog: nightwatchjs/nightwatch@v2.6.20...v2.6.21

v2.6.20

Compare Source

v2.6.19

Compare Source

  • Fixed #​3484 – Added elementId only param in moveTo command
  • Fixed #​3652 – Command queue nodes with autoInvoke mode were executed twice
  • Fixed #​3469 REPL interface exits on error
  • Fixed #​3591 - added support to stringify objects in console output

v2.6.18

Compare Source

What's Changed

No changes, just a version bump after the alpha.

Full Changelog: nightwatchjs/nightwatch@v2.6.17...v2.6.18

v2.6.17

Compare Source

What's Changed

Full Changelog: nightwatchjs/nightwatch@v2.6.16...v2.6.17

v2.6.16

Compare Source

What's Changed

New Contributors

Full Changelog: nightwatchjs/nightwatch@v2.6.15...v2.6.16

v2.6.15

Compare Source

  • Fixed #​3574 – using end_session_on_fail regression
  • Fixed #​3605 – when running in multiple environments, json and junit reporters generate report for only one environment

v2.6.14

Compare Source

  • Added global app property for using in native mobile app tests #​3549
  • Added support to automatically upload the native mobile app to Browserstack AppAutomate service #​3573
  • Added support for reading named exports from ESM files 2498fe
  • Added cli argument shortcuts for browser environments (--chrome, --firefox, --safari, --edge) 4cd9a8
  • Fixed visible commands for testing using Appium #​3566

Full Changelog: nightwatchjs/nightwatch@v2.6.13...v2.6.14

v2.6.13

Compare Source

  • Fixed #​3181 – waitForElementNotPresent inside section for the section element to be gone
  • Fixed #​3455 – CDP does not reset the connection after a test session ends

v2.6.11

Compare Source

  • Fixed headless mode in chrome (#​3581)
  • Fixed loading test files in ESM format on Windows #​3585
  • Fixed unhandled promise rejection for wait element commands #​3570
  • Added support for writing global test hooks using async/await and without a callback – 286aca

v2.6.10

Compare Source

v2.6.9

Compare Source

v2.6.8

Compare Source

v2.6.7

Compare Source

Full Changelog: nightwatchjs/nightwatch@v2.6.6...v2.6.7

v2.6.6

Compare Source

  • Fixed #​3531 – cannot use axeRun in async/await format

Full Changelog: nightwatchjs/nightwatch@v2.6.5...v2.6.6

v2.6.5

Compare Source

  • Fixed #​3422 – using .pause(0) command
  • Fixed an issue with global expect() assertions bfc2be

Full Changelog: nightwatchjs/nightwatch@v2.6.4...v2.6.5

v2.6.4

Compare Source

  • Fixed #​3538 – an issue with output logging for api testing

v2.6.3

Compare Source

  • Fixed #​3489 lodash dependency issue on windows

v2.6.2

Compare Source

v2.6.1

Compare Source

  • fixed an issue with .within() command for component tests
  • fixed an issue with expect.element().value – updated to use the getProperty('value') command;

v2.6.0

Compare Source

New features

  • HTML Reporter V2 - the built-in HTML reporter for Nightwatch has been significantly upgraded and contains:
    • brand new UI with added functionality
    • support for DOM snapshots and built-in trace viewer (using the--trace cli flag)
    • integrated support for displaying reports from visual regression tests (via the official plugin @​nightwatch/vrt)

Fixes & improvements

  • Added global before/after test hooks for each test worker process (#​3501)
  • Fixed #​3495 an unhandled rejection was occurring in some cases when using cucumber as a test runner
  • Fixed #​3451 - setGeolocation was not functional in headless mode
  • Fixed #​3478 - click() fails for iOS native app testing

v2.5.5

Compare Source

  • Added .within(<selector>) command which adds support for querying within elements

v2.5.4

Compare Source

v2.5.3

Compare Source

v2.5.2

Compare Source

New features

The v2.5.2 release adds API Testing capabilities to Nightwatch with the official plugin @nightwatch/apitesting which enables:

  • Perform API request testing
  • Setup a mock server which enables:
    • Assert on incoming requests
    • Assert on request headers
    • Assert on post data
Other Improvements
  • Added new properties to results object #​3494

v2.5.1

Compare Source

  • Fixed #​3475: an issue with propagating the exit code properly when using the programmatic api
  • Other – upgrade Selenium to 4.6.1

v2.5.0

Compare Source

New features

  • Run tests on Mobile web

    • end to end setup required to run tests on Mobile web using the @nightwatch/mobile-helper
    • test your website/web app on Android (Chrome & Firefox) & iOS (Safari)
  • Nx monorepo integration with the Nx plugin @​nightwatch/nx

Improvements

  • Added support for writing globals, page objects, and commands in ESM format c40f86
Fixes
  • Fixed #​3440 – socket hang up error when report_network_errors is enabled
  • Fixed #​3465 – an issue with using testSuite retries with enable_fail_fast enabled
  • Fixed #​3470 – issue with Actions API when passing async callback to browser.perform()
Other
  • Upgraded selenium-webdriver to 4.5.0

Release Walkthrough Video

Mobile Helper, Nx support (monorepos), API Testing and more: Nightwatch Release Walkthrough v2.5.0

Nightwatch Release Walkthrough v2.5.0

v2.4.2

Compare Source

  • Added an improvement for error messages shown when running React component tests
  • Fixed --open cli argument wasn't working properly #​3459
  • Added support for launching the local web server for component testing from the android emulator #​3460
  • Fixed an issue with displaying the http output in the HTML reporter when running tests in parallel 3462

v2.4.1

Compare Source

  • Fixed an issue resulting from await-ing test hooks properly in some cases 4f6c31

v2.4.0

Compare Source

New features

The v2.4.0 release brings improved support for Component Testing, which includes:

  • @nightwatch/storybook
    • new official plugin which integrates Nightwatch with Storybook
    • adds ability to run component stories directly from Nightwatch, including:
      • interaction tests using the play() function
      • run test hooks in the Nightwatch context
      • run test() function in the Nightwatch context
      • run configured accessibility rules automatically using the axe-core suite of commands
  • vite-plugin-nightwatch
    • upgraded plugin to use Vite 3
  • @nightwatch/vue
    • new dedicated Vue.js component testing plugin which includes Vite 3 and manages its own Vite dev server
  • @nightwatch/react

New CLI flags

  • --serial to run tests in serial mode (disable parallelism)
  • --workers to specify the number of test workers to be used when running tests in parallel
  • --reuse-browser to reuse the browser session if running in serial mode
component testing related
  • --debug – automatically pause the test execution after mounting the component and open the Nightwatch debug REPL interface.
  • --story - allows to specify which story to run from the current file (when using Storybook or JSX written in component story format)
  • --preview - used to preview a component story/test; automatically pause the test execution after mounting the component.

Other Improvements

  • Added support to use --devtools CLI flag in Edge and Safari to open the Dev Tools automatically
  • Added support to enable running tests in parallel by default if not set PR #​3364
  • Added support for using nightwatch.conf.ts as config file and a few other improvements for running typescript tests PR #​3316

Fixes

  • Fixed #​3404 an issue with the moveTo command
  • Fixed #​3256 .verify assertions do not resolve when called from within the .perform() command

v2.3.9

Compare Source

Minor update for the axe-nightwatch-verbose dependency.

v2.3.8

Compare Source

  • Fixed #​3396 showing version using the --version cli flag
  • Fixed #​3336 an issue with using browser.resizeWindow()

v2.3.7

Compare Source

Fixed #​3355 – updating the build name using client.updateCapabilities did not work

v2.3.6

Compare Source

v2.3.5

Compare Source

  • Added new CLI flag ``--report-filename` to specify the report file name for the JSON reporter d73a6f
  • Fixed #​3361 -- expect.cookie always returning undefined value
  • Fixed an issue where the error thrown for using incorrect arguments for element commands was not reported if using async/await testcase e9e38c
  • Fixed #​3372 -- chaining custom commands from page objects when imported through plugins interface
  • Added analytics feature to collect anonymous user metrics (opt in only) PR #​3141

v2.3.4

Compare Source

  • Fixed #​3284 – beforeEach hook was executed even it() / test() is marked as skipped
  • Fixed #​3352 – a TypeError was thrown if a custom command is throwing an error

v2.3.3

Compare Source

Improvements

  • Added support for using native mobile drivers (#​3335)
  • Added new cli flag --list-files (#​3246)
  • Added support to retain the html report between test runs (#​3309)

Fixes

  • Fixed #​3304 - added buildname to settings when running on Browserstack
  • Fixed #​3301 - awaited asserts used inside custom commands were hanging the test run
  • Fixed #​3257 - expect.elements(..).count should be 0 if element not found

v2.3.0

Compare Source

New feature

Pause mode
Add a pause() command to pause your tests indefinitely. In pause mode, you can check the state of your browser or use DevTools to debug. You can also see step-by-step execution from the paused state where the test automatically pauses at the next step.

*Note: The [current pause command](https://nightwatchjs.org/guide/writing-tests/write-complex-user-actions.html#available-actions) usage stays as is. You can pass the duration of the pause and the test will pause only for that duration on the mentioned devices.*
Debug mode
Add a debug() command to pause your test at that step. The debug mode also allows you to check the state of the browser and use DevTools. Furthermore, it offers you an interface to try out nightwatch commands and assertions while your test is paused.

Improvements & Fixes

  • Added actionable error messages - #​3233
    Redesigned error messages for improved context, relevant documentation and mitigation steps to fix the error.
  • Fixed #​3177 – additional options in config does not getting passed to cucumber runner
  • Added support for waitUntil to use a custom message for timeout errors (nightwatchjs/nightwatch@4b79d79)

Release Walkthrough

Nightwatch release walkthough Nightwatch release walkthough

v2.2.3

Compare Source

  • Fixed #​3183 – setting chromeOptions in older format didn't work
  • Fixed #​3130 – an issue with setting the driver service port number in case of parallel runs with test workers
  • Fixed #​3096 – an issue with session request redirection when using SauceLabs
  • Fixed #​3264 – HTML reporter raw http logs were failing to escape html
  • Added support for .mockNetworkResponse() to accept relative urls (to launch_url setting)
  • Other – Upgraded selenium-webdriver version to 4.3.1 (#​3278)

v2.2.2

Compare Source

Important fixes
  • Fixed #​2975expect.element().to.not.be.present throws error when the element is not present
  • Fixed – an issue with persisting http data for the HTML reporter
New features

The new Nightwatch init CLI tool is now available to use in order to kick-start a new Nightwatch test project in under 60 seconds.

Simply run:

npm init nightwatch
Nightwatch CLI tool preview

Release notes for create-nightwatch:
https://github.com/nightwatchjs/create-nightwatch/releases/tag/v1.0.0

Other
  • Downgraded selenium to 4.1.1 to mitigate a chromedriver startup issue

v2.2.1

Compare Source

The latest release introduces a new built-in HTML reporter and several new API commands based on the Chrome Devtools Protocol for mocking network responses, capturing logs, and more.

Improvements

Other

  • Added support to find frame when passing argument as id or name - #​3205
  • Upgraded selenium-webdriver to v4.2.0 - #​3215

v2.1.8

Compare Source

  • Added - platform methods in case of Appium client (#​3166)
  • Fixed - an issue with generating XML output for when running tests in parallel (#​3163)

v2.1.7

Compare Source

  • Upgraded the global package to fix an issue on windows

v2.1.5

Compare Source

  • Fixed #​3127 -- skipped count was incorrect in global reporter results
  • Fixed #​3163 -- a circular reference issue occurring sometimes when running tests in parallel
  • Added support to throw an error when passing undefined args in sendKeys command (#​3045)
  • Added support to find frame when passing argument as id or name (#​3097)
  • Added update to browserstack transport and built-in config (#​3148)
  • Added support for marking test scenarios passed/failed and send reason to Browserstack while using Cucumber as a test-runner (#​3132)

v2.1.4

Compare Source

  • Fixed #​3033 – global element() was ignoring the global locate strategy
  • Fixed #​3138 -- Unhandled rejection while using expect assertions in an async test step

v2.1.3

Compare Source

  • Fixed #​3159 - updated ejs to avoid a high severity vulnerability
  • Fixed #​3154 - updated peer dependency version of chromedriver

v2.1.2

Compare Source

v2.1.1

Compare Source

v2.1.0

Compare Source

The Nightwatch 2.1 release adds a few important fixes and several improvements, including upgrade to Selenium 4.1.1. Here's the full list:

Improvements

describe('sample with relative locators', function () {
  before(browser => browser.navigateTo('https://archive.org/account/login'));
  
  it('locates password input', function (browser) {
    const passwordElement = locateWith(By.tagName('input')).below(By.css('input[type=email]'));

    browser
      .waitForElementVisible(passwordElement)
      .expect.element(passwordElement).to.be.an('input');

    browser.expect.element(passwordElement).attribute('type').equal('password');
  });
});

  • New error stack trace output which parses and highlights the source code line – #​3071

image

  • Set network emulation settings in Chrome/Edge with the .setNetworkConditions() command (#​2996)

browser.setNetworkConditions({ 
  offline: false, 
  latency: 5, // Additional latency (ms). 
  download_throughput: 500 * 1024, // Maximal aggregated download throughput. 
  upload_throughput: 500 * 1024 // Maximal aggregated upload throughput. 
});

  • Automate the input of basic auth credentials with the .registerBasicAuth() command (Chrome/Edge) (#​3116)

browser
     .registerBasicAuth('test-username', 'test-password')
     .navigateTo('http://browserspy.dk/password-ok.php');

Important Fixes

  • Fixed #​3079 – unable to clear element in setValue command
  • Fixed #​3085 – failing waitFor commands did not failed the test when using the cucumber built-in runner
  • Fixed #​3124 - multiple terminal windows opening when running in Chrome on Windows
  • Fixed #​3086 - 'RangeError: Maximum call stack size exceeded' when requiring unknown modules

v2.0.10

Compare Source

Fixed an issue occurring when using the Mocha integrated test runner and a test failure was logged in an async testcases.

v2.0.9

Compare Source

  • Fixed #​3077 - an issue with page navigate where the url was defined as a function

v2.0.8

[Compare Source](https://togithub.com/nig

@mend-for-github-com mend-for-github-com bot added the security fix Security fix generated by WhiteSource label Sep 29, 2023
@mend-for-github-com mend-for-github-com bot changed the title chore(deps): update dependency nightwatch to v3 chore(deps): update dependency nightwatch to v3 - autoclosed Dec 8, 2023
@mend-for-github-com mend-for-github-com bot deleted the whitesource-remediate/nightwatch-3.x branch December 8, 2023 02:08
@mend-for-github-com mend-for-github-com bot changed the title chore(deps): update dependency nightwatch to v3 - autoclosed chore(deps): update dependency nightwatch to v3 Dec 12, 2023
@mend-for-github-com mend-for-github-com bot reopened this Dec 12, 2023
@mend-for-github-com mend-for-github-com bot restored the whitesource-remediate/nightwatch-3.x branch December 12, 2023 02:08
@mend-for-github-com mend-for-github-com bot force-pushed the whitesource-remediate/nightwatch-3.x branch from 9071e87 to 765529e Compare December 12, 2023 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security fix Security fix generated by WhiteSource
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants