Nightwatch "next major" failing

Created on 27 September 2024, 21 days ago

Problem/Motivation

ex.g. https://git.drupalcode.org/project/project_browser/-/jobs/2879918

Error
   uncaughtException: browser.drupalRelativeURL(...).waitForElementVisible(...).updateValue(...).updateValue(...).element(...).click(...).waitForElementVisible is not a function
TypeError: browser.drupalRelativeURL(...).waitForElementVisible(...).updateValue(...).updateValue(...).element(...).click(...).waitForElementVisible is not a function

Steps to reproduce

If you can get nightwatch running locally, that would be amazing - and see if this fails for 11.0.x-dev with PHP 8.3.

Proposed resolution

Fix whatever this is. There's a small chance this is an issue with the gitlab_ci_templates project, but likely not. Probably just something with the version of Nightwatch and Webdriver/Chromedriver being used by the CI.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chrisfromredfin
  • πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine
  • Pipeline finished with Failed
    21 days ago
    Total: 359s
    #294642
  • Pipeline finished with Failed
    21 days ago
    Total: 384s
    #294700
  • πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

    Turns out this runs on 11.0.4 just fine, but fails on 11.0.x - these are the only 6 commits since:

    • #3474108 β†’ by smustgrave, tomomi: Replace eslint-plugin-jquery with eslint-plugin-no-jquery
    • #3465154 β†’ by yujiman85, n-m-daz, nod_: Update run-tests.sh help output to match current test organization
    • #3470114 β†’ by quietone, smustgrave: Change string 'Modules to enable' that are not in comments
    • #3471949 β†’ by mstrelan: Allow passing MarkupInterface to AssertContentTrait::setRawContent
    • #3473214 β†’ by mstrelan: Stop passing ints to DateTimePlus::createFromFormat and DrupalDateTime::createFromFormat
    • #3302833 β†’ by akhil babu, b_sharpe, alexpott, oily, smustgrave: Improve PluginNotFound exception to include possible shorthand action IDs
  • πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

    That might be wrong (above). I was using drupal-mrn.dev but more has been committed to 11.x-dev. I think we'll need to try and git bisect and run the tests and try to figure out which commit caused the issue.

  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    Turns out this runs on 11.0.4 just fine, but fails on 11.0.x

    If you wanted to prove this in the pipeline, you can add:

    composer (next major):
      variables:
        DRUPAL_CORE: '11.0.4'
    

    to temporarily fix the core version. It would be good to see the nightwatch test pass in a pipeline here. Then we know exactly what we are dealing with.

  • Pipeline finished with Failed
    21 days ago
    Total: 423s
    #294777
  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    That was interesting. I ran it with core 11.0.4 at the Nightwatch version was 2.4.2 not 3.7.0 which we get with 11.x-dev
    https://git.drupalcode.org/issue/project_browser-3477343/-/jobs/2883174

  • Pipeline finished with Failed
    21 days ago
    Total: 510s
    #294782
  • Pipeline finished with Failed
    18 days ago
    #296859
  • Pipeline finished with Failed
    18 days ago
    #296860
  • Pipeline finished with Canceled
    18 days ago
    Total: 143s
    #296863
  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    I've done another test, using 11.0.x-dev for the Drupal core version in 'Next Major'. This shows the actual versions is 11.0.5-dev in the Nightwatch job, and as that is running Nightwatch 2.4.2 it also needs the legacy driver. The tests end green
    https://git.drupalcode.org/issue/project_browser-3477343/-/pipelines/296863

    To me, this shows that the problem is caused by the differences between Core 11.0.x-dev / Nightwatch 2.4.2 and Core 11.x-dev / Nightwatch 3.7.0. Apologies is that was obvious, but I wanted to check the comment in #4 "but fails on 11.0.x" as that is not strictly true. Hope this helps. You can revert my last commit when you next want to test at 11.x-dev

  • πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

    Oh wonderful, I think this is actually what we want - the 11.0.x-dev to be our test base. Really appreciate you jumping in, @jonathan1055!

  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    Pleased to help.
    What about your PHPUnit jobs? They currently pass at 11.x-dev with the new selenium driver
    https://git.drupalcode.org/project/project_browser/-/jobs/2882356

    So the question is, do you want those to stay at 11.x-dev or bring them back also to align with Nightwatch at 11.0.x-dev? Let me know you preference and I can adjust your template, becauase temporarily I skipped phpunit (knowing it would fail the way I set up the demonstration of Nightwatch)

Production build 0.71.5 2024