Errors during login on Functional Javascript tests should surface the underlying exception

Created on 5 June 2024, 3 months ago

Problem/Motivation

Functional Javascript tests can be difficult to debug. For instance, if you have an error in PHP code that results in an exception on page load, you will only see an unhelpful message about not finding a button with the correct label or ID to log in. Especially when working locally, this would require a developer to install a working webdriver instance locally and know to drop a breakpoint at a place in the test code where they could see the response. In many cases, this is a "WSOD" type exception that is returned instead of the login screen. None of this helpful information is currently exposed in the test failure. Since logging in to a site is usually one of the first steps in a functional JS test, this is a good place to catch exceptions that result in a "broken" site overall.

Steps to reproduce

Have a PHP error (e.g., mismatched return types) that result in a broken login page. Get an unhelpful error message in Drupal CI.

Proposed resolution

Show the login page's contents in the assertion message, aiding debugging.

Remaining tasks

Review and commit.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Don't think we need one.

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
SystemΒ  β†’

Last updated 1 day ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States bradjones1 Digital Nomad Life

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024