claroAutocompleteTest passes, but log shows a 404

Created on 17 January 2016, almost 9 years ago
Updated 22 January 2024, 9 months ago

Problem/Motivation

core/tests/Drupal/Nightwatch/Tests/claroAutocompleteTest.js passes in our Nightwatch job on GitLab.
Yet, when we look at it's console log in the saved artifact after the test, we see:
"http://localhost/subdirectory/form-test/autocomplete-1?q=123 - Failed to load resource: the server responded with a status of 404 (Not Found)"

The original IS below already found the solution for the 404 problem:

In core/modules/system/tests/modules/form_test/form_test.routing.yml, how is it possible that these invalid route definitions (use of with no underscore instead of ) don't cause test failures when form_test is used in general and when the autocomplete test is performed in particular?

The test itself isn't affected by the 404. Since it's only testing the layout of the "processing" phase of the autocomplete, it doesn't need a response. In fact this situation is beneficial, since the "processing" phase is currently endless, due to the lack of any response that would end it.

Nevertheless, this is not code we want to have as an example in core.
Also, this form might be used elsewhere someday, by somebody expecting it to actually works.

So let's fix it.

Steps to reproduce

Go to the Nightwatch job of a GitLab CI run, browse the Job artifacts and under nightwatch_output/consoleLogs/Tests/claroAutocompleteTest find the JSON file.
It will contain the key message with value "http://localhost/subdirectory/form-test/autocomplete-1?q=123 - Failed to load resource: the server responded with a status of 404 (Not Found)".
I've attached an example JSON from a random run to the issue.

Proposed resolution

- Fix the invalid route definitions
- Test the return of the autocomplete in claroAutocompleteTest
- Add some comments in claroAutocompleteTest to explain what's actually being tested.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

10.2 ✨

Component
JavascriptΒ  β†’

Last updated 5 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024