Needs work
Project:
Drupal core
Version:
main
Component:
javascript
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2019 at 16:01 UTC
Updated:
23 Jan 2024 at 14:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lauriiiComment #4
lauriiiWorked on this with @tedbow.
Comment #5
wim leersIs a failing test-only patch possible here?
Comment #6
wim leersComment #7
lauriii#5: We don't really have test coverage for the Nightwatch setup. Maybe we should open a follow-up to see if we could add something?
Comment #8
wim leersAny advice for how a reviewer and core committer should assess this?
Comment #9
lauriiiTo check if this works, you can see if files are getting generated into
/core/reports/nightwatch/consoleLogsfolder while running tests.Comment #10
wim leersSo: manual testing is how a reviewer can RTBC it and how a core committer can confirm it?
Comment #11
lauriiiThat's what I'd recommend. Maybe we could open a follow-up for adding test coverage to this?
Comment #12
wim leersI'd love to be the reviewer to RTBC this, but I literally have never succeeded in running Nightwatch tests on my local system. Functional JavaScript tests do work fine.
I did create that follow-up: #3086720: Add explicit test coverage for the logging of Nightwatch testing.
Comment #14
gregatp commentedPatch reroll
Comment #21
needs-review-queue-bot commentedThe 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.
Comment #22
nikhil_110 commentedAttached patch against Drupal 10.1.x
Patch #14 is not applied for Drupal 10.1.x so Inter-diff file is not added.
Comment #24
wim leersComment #25
spokjeComment #26
spokjeComment #28
spokjeI 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.
Comment #29
spokjeSo I think the approach taken in
core/modules/toolbar/tests/src/Nightwatch/Tests/toolbarApiTest.jsshould be the one to go for IMHO.Sadly since
logAndEndworks with the _global_ test hooks, which means theafterEachin 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.