The Needs Review Queue Bot → tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇮🇳India nikhil_110
Attached patch against Drupal 10.1.x
Patch #14 is not applied for Drupal 10.1.x so Inter-diff file is not added.
Checking patch core/tests/Drupal/Nightwatch/Commands/drupalLogAndEnd.js... Checking patch core/tests/Drupal/Nightwatch/Tests/loginTest.js... error: while searching for: .drupalRelativeURL('/admin/reports') .waitForElementVisible('body', 1000) .assert.containsText('h1', 'Reports') .assert.noDeprecationErrors(); }, }; error: patch failed: core/tests/Drupal/Nightwatch/Tests/loginTest.js:19 error: core/tests/Drupal/Nightwatch/Tests/loginTest.js: patch does not apply Checking patch core/tests/Drupal/Nightwatch/Tests/statesTest.js... error: while searching for: .drupalRelativeURL('/form-test/javascript-states-form') .waitForElementVisible('body', 1000) .waitForElementNotVisible('input[name="textfield"]', 1000) .assert.noDeprecationErrors(); }, }; error: patch failed: core/tests/Drupal/Nightwatch/Tests/statesTest.js:19 error: core/tests/Drupal/Nightwatch/Tests/statesTest.js: patch does not apply Checking patch core/tests/Drupal/Nightwatch/globals.js... error: while searching for: export const drupalDbPrefix = null; export const drupalSitePath = null; module.exports = { before: done => { error: patch failed: core/tests/Drupal/Nightwatch/globals.js:14 error: core/tests/Drupal/Nightwatch/globals.js: patch does not apply
10:17 8:09 Running- last update
over 1 year ago 29,304 pass - Assigned to spokje
- 🇳🇱Netherlands spokje
I applied the consoleLog fix to the first commit in the MR and then reversed it in the second commit.
I compared the consoleLogs from the artifacts of both Nightwatch GitLab CI jobs and besides some timestamps they are exactly equal.
So, as far as I can see, there's currently no problem with the consoleLogs and there's no need for a fix.However it is a good idea to add consoleLogs to as much Nightwatch tests as possible, so I'm going to repurpose this issue for that cause.
- Issue was unassigned.
- 🇳🇱Netherlands spokje
So I think the approach taken in
core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarApiTest.js
should be the one to go for IMHO.Sadly since
logAndEnd
works with the _global_ test hooks, which means theafterEach
in there will only run after each testsuite instead of each single test, this isn't going to work with alteringlogAndEnd
.I'll leave that for somebody else, I've tried real hard to learn to love Nightwatch, but it's just not happening for me.
I'm going to leave it alone and spend my time on other stuff in core.