Problem/Motivation

In parent issue #3258933-51: [meta] Update JavaScript dependencies for Drupal 10 we discovered updating Nighwatch to the latest version breaks all nightwatch tests.
That's why we handle the update in this separate child issue.

Relevant comments from the parent issue

This seems the likely culprit to me:

-    selenium-webdriver "4.3.1"
+    selenium-webdriver "4.6.1"

Maybe we should split off the Nightwatch update into a separate child issue and get the other ones in whilst we investigate?

Spokje in #3258933-53: [meta] Update JavaScript dependencies for Drupal 10

Possibly related, see https://github.com/SeleniumHQ/docker-selenium/issues/1723. This caused FunctionalJavascript tests to fail for me and at least a handful of others. Also affects Drupal Test Traits. Pinning to selenium/standalone-chrome:4.5.2 resolved the issue. I suspect it's the same issue here.

mstrelan in #3258933-54: [meta] Update JavaScript dependencies for Drupal 10

$ yarn-lock-diff -o old.yarn.lock -n yarn.lock
┌──────────────────────────────┬───────────────┬────────────────┐
│ package name                 │ old version(s)│ new version(s) │
├──────────────────────────────┼───────────────┼────────────────┤
│ axe-core                     │ 4.5.1         │ 4.5.2          │
├──────────────────────────────┼───────────────┼────────────────┤
│ nightwatch                   │ 2.4.2         │ 2.5.2          │
├──────────────────────────────┼───────────────┼────────────────┤
│ selenium-webdriver           │ 4.3.1         │ 4.6.1          │
├──────────────────────────────┼───────────────┼────────────────┤
│ untildify                    │ -             │ 4.0.0          │
└──────────────────────────────┴───────────────┴────────────────┘

Proposed resolution

- yarn upgrade nightwatch
- Fix problems
- Review
- Commit

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Spokje created an issue. See original summary.

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
StatusFileSize
new3.76 KB
spokje’s picture

Assigned: spokje » Unassigned
Status: Active » Needs work
effulgentsia’s picture

Title: Update Nightwatch to latest version » Update Nightwatch from 2.4.2 to 2.5.3
Issue tags: +Drupal 10 stable release blocker

Although the parent issue is already tagged as a stable release blocker, I think we're now getting close enough to 10.0.0's scheduled release date, that it's time for the individual issues to also be tagged with that.

spokje’s picture

StatusFileSize
new2.93 KB

So we know stuff breaks when we jump to 2.5.3.

Let's give the smallest upgrade a test-run, going to 2.5.0, which contains:

Upgraded selenium-webdriver to 4.5.0

spokje’s picture

StatusFileSize
new4.9 KB

...and let's test that only with Nightwatch tests for now.

spokje’s picture

Right, that didn't really help.

Looks like as soon as we update selenium-webdriver, which happens in the first update, to nightwatch 2.5.0, we loose all contact with the selenium server in out tests.

spokje’s picture

FWIW: If I run 10.x branches in DDEV with the applied patch and with the addition of https://github.com/drud/ddev-selenium-standalone-chrome, nightwatch tests are fine.

Even if I update the chromedriver to 107. it still works.

That makes me believe the "problem" might be in the drupalci/chromedriver:production Docker container.

effulgentsia’s picture

Is there something that can be changed in https://git.drupalcode.org/project/drupalci_environments/-/blob/producti... to fix it? If so, let's open an issue in https://www.drupal.org/project/issues/drupalci_environments for that.

effulgentsia’s picture

https://github.com/SeleniumHQ/docker-selenium/issues/1723#issuecomment-1... has some info that might be relevant to #10, but I don't think I totally understand the implications of that comment.

effulgentsia’s picture

I discussed this with @xjm and @catch, and they agreed that this does not need to block a 10.0.0 release. We can do this in 10.1 if we're unable to do it before 10.0.

effulgentsia’s picture

Title: Update Nightwatch from 2.4.2 to 2.5.3 » Update Nightwatch from 2.4.2 to 2.5.4

Nightwatch 2.5.4 has been released. https://github.com/nightwatchjs/nightwatch/releases/tag/v2.5.4 doesn't appear to indicate that the issue we're seeing here has been resolved though.

longwave’s picture

Title: Update Nightwatch from 2.4.2 to 2.5.4 » Update Nightwatch from 2.4.2 to 2.6.19
Status: Needs work » Needs review
Parent issue: #3323988: Update Nightwatch from 2.4.2 to 2.6.19 » #3343216: [meta] Update JS dependencies for Drupal 10.1
StatusFileSize
new22.49 KB

Not very hopeful, given the lack of movement on the GitHub issue linked above, but let's try Nightwatch 2.6.19.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

Seems those updates caused the chromedriver to not connect

https://dispatcher.drupalci.org/job/drupal_patches/175960/console

wim leers’s picture

Since #15, https://github.com/nightwatchjs/nightwatch/releases/tag/v2.6.20 was released, but I don't see anything in the release notes that sounds like it would help fix the failure we observed.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

longwave’s picture

Status: Needs work » Closed (duplicate)

Working in #3371963: Update Nightwatch to 3.x instead, will transfer credit.

quietone’s picture

Version: 11.x-dev » 10.1.x-dev

Restoring version.