End the Nightwatch test if the drupalInstall fails

Created on 11 November 2024, about 1 month ago

Problem/Motivation

Now if the Nightwatch test fails to install Drupal using browser.drupalInstall() from the function before(browser), it still continues to execute the test functions, which lead to not very clear errors.

It's better to stop running the whole test file, if the Drupal installation fails.

Steps to reproduce

1. Make a profile that throws an exception on Drupal Install.

2. See the error in the Nightwatch output:

  ✖ NightwatchAssertError
   Command failed: php ./scripts/test-site.php install  --install-profile "commercetools_content_test_profile"  --base-url http://localhost/web --db-url mysql://drupaltestbot:drupaltestbotpw@database/mysql --json

3. See that after this error all the tests contained in this file, still trying to execute, producing different errors because the Drupal installation is broken.

Proposed resolution

We should stop processing all the tests in the current file, if the function before(browser) throws an error.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

11.0 🔥

Component

javascript

Created by

🇦🇲Armenia murz Yerevan, Armenia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024