Problem/Motivation

Node.js was updated from v20 to v24 earlier today. We did not see fails on the issues updating it, but probably because the CI update issue CI results were from before it was updated while the code update did not run on CI.

All Nightwatch tests fail since then. This is due to a deep comparison difference. Both failing assertions do a deep-equality check on DOM elements returned from the browser, in jQueryUIPositionShimTest.js:1071 and again around line 1453. On Node v20, deepEqual compared Promises like plain objects and they matched. On Node v24 two distinct Promise instances are never deep-equal, even with the same resolved value.

Steps to reproduce

Proposed resolution

Instead of passing Promises as-is, gather their values and do manual comparison where needed.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

LLM disclosure

LLM was used to diagnose and fix this issue.

Issue fork drupal-3623728

Command icon 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:

Comments

gábor hojtsy created an issue. See original summary.

gábor hojtsy’s picture

Issue summary: View changes
gábor hojtsy’s picture

Issue summary: View changes
godotislate’s picture

Status: Active » Needs review

I don't have NW expertise or experience, but the changes look pretty straightforward to understand. I have one minor question on the MR.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Let's try to get rid of nightwatch in #3338664: Migrate Nightwatch Axe tests to PHPUnit and friends asap - probably we could get down to zero core tests in 12.1 and completely remove support in 13.

I'm not really qualified to review this but the changes are simple enough and unbreak HEAD, so moving to RTBC.

  • godotislate committed 42aca8d1 on main
    fix: #3623728 Node.js v24 upgrade fails all Nightwatch test runs
    
    By:...

  • godotislate committed 113da535 on 11.x
    fix: #3623728 Node.js v24 upgrade fails all Nightwatch test runs
    
    By:...
godotislate’s picture

Version: main » 11.4.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed and pushed 42aca8d to main and 113da53 and to 11.x. Thanks!

Do we need to backport to 11.4.x or other branches as well?

catch’s picture

We didn't backport #3620803: Update minimum Node version to 24 to 11.x, but I think it would be reasonable to backport this fix + the node version bump in .gitlab-ci.yml in this issue together (without increasing the requirement).

godotislate’s picture

Yeah, I backported this fix to 11.x because even that was failing: https://git.drupalcode.org/project/drupal/-/jobs/12240882.

So now I'm wondering if the other branch jobs are affected as well.

godotislate’s picture

Running the scheduled 11.4.x daily manually to see: https://git.drupalcode.org/project/drupal/-/pipelines/964139

godotislate’s picture

catch’s picture

Ah probably when the container was updated, it's running on node 24 despite specifying node 20 (treated as minimum?).

godotislate’s picture

I think I'll wait till tomorrow to commit to 11.4.

Also wait for the 10.6.x daily and 11.3.x weekly (both scheduled to run in a few hours) to see if the changes are needed there.

godotislate’s picture

Last scheduled runs:
11.4.x: https://git.drupalcode.org/project/drupal/-/pipelines/964989 (Nightwatch fail)
11.3.x: https://git.drupalcode.org/project/drupal/-/pipelines/964700 (Nightwatch fail)
10.6.x: https://git.drupalcode.org/project/drupal/-/pipelines/964648 (Nightwatch pass)

So, it seems like we should backport to 11.4.x and 11.3.x?

catch’s picture

Backport sounds good here, even if it's a dangling commit on 11.3.x

  • godotislate committed 50c9ea29 on 11.3.x
    fix: #3623728 Node.js v24 upgrade fails all Nightwatch test runs
    
    By:...

  • godotislate committed 771d40e0 on 11.4.x
    fix: #3623728 Node.js v24 upgrade fails all Nightwatch test runs
    
    By:...
godotislate’s picture

Version: 11.4.x-dev » 11.3.x-dev
Status: Patch (to be ported) » Fixed

Backported to 11.4 and 11.3 after consulting with catch and xjm. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.