Problem/Motivation
In 10.x we are currently on Nightwatch 2.1.3 but the latest version is 2.4.1.
Note: 9.5.x is on Nightwatch 1.7.13, which is the latest release on the 1.x branch. No changes needed there.
Steps to reproduce
Proposed resolution
Update to Nightwatch 2.4.1 on Drupal 10.0.x.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | 3306446-23.patch | 37.66 KB | finnsky |
| #23 | interdiff_18_23.txt | 17.15 KB | finnsky |
| #18 | 3306446-18.patch | 24.81 KB | bnjmnm |
| #17 | 3306446--17.patch | 25.18 KB | bnjmnm |
Issue fork drupal-3306446
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:
- 3306446-update-nightwatch-to
changes, plain diff MR !2696
Comments
Comment #3
spokjeComment #4
spokjeComment #5
spokjeRight... fun stuff: From the release notes of
selenium-webdriverv4.2.0:Anybody wanna guess ChromeDriver we're on...
Package Currentchromedriver 98.0.1Comment #6
spokjeIndeed the NightWatch tests are going *CLUNK*.
So it looks to me we need to upgrade the Drupal CI Chrome (+chromedriver) to 104 (and we all know the "fun" we had the last time we upped the CI Chrome version) before the update of NightWatch itself can happen.
Comment #7
spokjeCreated #3306450: Update Chrome container to use newer version upon which this is now postponed.
Comment #8
spokjeComment #9
lauriiiDrupal 10 should be on Nightwatch 2.1.4: https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/yarn.lock#L... so I'm not sure where did the Nightwatch 1.7.13 on 10.x come from. Either way we should update to the latest version.
Comment #10
lauriiiComment #11
spokjeMe neither, since I said in the IS:
Comment #12
nod_v2.3.4 was released last week
Comment #13
andypostComment #14
andypostHere's re-roll just using
yarn upgrade nightwatch@^2.3.9Comment #15
longwaveLet's try upgrading the JS chromedriver at the same time, now that the DrupalCI chrome container is also updated.
Comment #16
fcertal commentedHi folks,
I'm not sure if this is the right place to post my doubt.
On a client's project we're addressing the CVE-2022-36067 vulnerability report, that says:
Found that vm2 is a dependency of nightwatch and that is in 3.9.9 version in drupal 9.5.x
This isn't installed on the client's server, but they get the warning. So, I've put together the following commands to generate a patch that came out with the vm2 3.9.11.
How can I test this patch and figure out if it isn't blow out the entire project?
Comment #17
bnjmnmComment #18
bnjmnmRemoved some commented code from #17
Comment #19
nod_latest release is 2.4.1 now :p https://github.com/nightwatchjs/nightwatch/releases/tag/v2.4.1
looks good enough to make this update in any case. We can always do the other update later
Comment #20
andypostThe only nitpick
IIRC Drupal-CI went to 107 already
Comment #21
longwave@andypost the version of Chromedriver in yarn.lock doesn't really matter, it is only used when running Nightwatch locally *and* an environment variable is set to use it; I suggested removing it in #3317879: Remove Chromedriver as a JavaScript dependency
Comment #22
longwaveUpdated IS to reflect correct version number.
Comment #23
finnsky commentedAfter patch #18 i got deprecation messages from nightwatch
New patch resolve some of them
Comment #24
wim leers#23 is unfortunately no longer passing tests. It also seems like a pretty drastic change compared to #18 which was RTBC'd? 🤔
Comment #25
longwavePersonally I would prefer to commit #18 which passed tests, and then solve any deprecations separately.
Comment #26
wim leers#25++
Let's do that.
⚠️#18 is RTBC, not #23. Let's create a follow-up to address deprecations.
Comment #28
catchCommitted/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!
Let's open a new issue to address #23.
Comment #29
andypostFiled follow-up #3318301: Fix deprecations of Nightwatch
btw it could be a cause of random failures of JS tests as the message is thrown few times per nightwatch tests, maybe it needs to fix something at infra side
Comment #30
jonathan1055 commentedWe are seeing D10 contrib test runs end with gray "build successful" instead of green "pass" which we get at D9. The modules do not have any nighwatch.js tests and the only difference in the log is that on D9 runs this was marked as a warning, but in D10 it gives an error. Here's a visual comparison of the log:
The above was from Display Suite https://www.drupal.org/node/607826/qa
If this has been caused by the upgrade to nightwatch 2.4.1 then maybe we need to document this somewhere. Also help other contrib maintainers who do not have any nightwatch tests to explain how to skip the nightwatch section. I have done this by removing 'nightwatch.js' in drupalci.yml but many contrib projects are just using the default drupalci.yml (ie they do not have their own to modify)
Comment #31
swentel commentedFWIW, I saw this starting to happen yesterday, while working on DS and Field Group, while branch tests where fine 3 days ago, and I wasn't really uploading/committing funky patches :) Adding a drupalci.yml file made it all green again (cf #3318535: Create a drupalci.yml file and #3318536: Create a drupalci.yml file)
@jonathan1055 thanks for the pointers!
Comment #32
jonathan1055 commentedThis is also being discussed on Slack in the #drupal-infrastructure channel
https://app.slack.com/client/T06GX3JTS/C51GNJG91/thread/C51GNJG91-166730...
Comment #33
longwaveComment #34
hestenetContrib tests should no longer error out with 'Build successful' on DrupalCI. See #3318586: Fix DrupalCI handling of Nightwatch exit codes after 2.4.1 update