Problem/Motivation
In /core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js, the sessionStorageEntries variable is filtered with Array.prototype.filter(). This filter function checks that message has a specific string using new RegExp('[Deprecation]').test(message). But, this RegExp doesn't mean "[Deprecation]" includes in the message.
The same problem has /core/tests/Drupal/Nightwatch/Assertions/noDeprecationErrors.js too.
Steps to reproduce
1. Add console.warn('D'); next line of console.warn(`[Deprecation] ${message}`); in /core/misc/drupal.js
2. Remove '[Deprecation]' string from console.warn(`[Deprecation] ${message}`); in Drupal.deprecationError().
3. Add breakpoint line 8 at /core/tests/Drupal/Nightwatch/Assertions/deprecationErrorExists.js and run Nightwatch.js test from Node.js debuging terminal.
4. The deprecationMessages variable is assigned with no filtered value.
Proposed resolution
Replace new RegExp('[Deprecation]').test(message) with message.includes('[Deprecation]') in both files.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3503556
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3503556-it-seems-to
changes, plain diff MR !11068
Comments
Comment #3
tom kondaRan Functional JavaScript tests several times.
But there is an error on Drupal\Tests\ckeditor5\FunctionalJavascript\ImageUrlProviderTest.
Need to resolve this error.
Comment #4
tom kondaI reran Functional JavaScript tests and all tests are passed.
It is probably random failure.
Please review.
Comment #5
smustgrave commentedSeems pretty straight forward
Searched for new RegExp('[Deprecation]'). and all 2 instances have been replaced.
Comment #6
longwaveComment #7
longwaveGood find!
Committed and pushed daf3cd72f76 to 11.x and 22ee1f029b0 to 11.1.x and ddddd508515 to 10.5.x and 6b55b8c6d24 to 10.4.x. Thanks!
Comment #13
longwave