Update Nightwatch jobs to new driver when D11 "current" uses Nightwatch 3
Problem/Motivation
In #3463894: Update templates so 11.0 is the default/current branch we discovered that the new "current" variant still needs to use the legacy driver, because Core 11.0 uses Nightwatch 2.4, which is not compatible with the W3C Selenium driver.
Drupal core 11.1 and above has Nightwatch 3.9 and can use the new driver variables, although it still runs when using the legacy values.
Update: 14 November
CORE_STABLE is now used to define the 'current' core version to test against, and this is 11.0.7
CORE_NEXT_MINOR is now defined as '11.1.x-dev', which runs core 11.1.0-dev
Update: 21 January 2025
CORE_STABLE for 'current' is 11.1.1
CORE_NEXT_MINOR is back to '11.x-dev', which runs core 11.2-dev
Three variables are affected by this change. The new values are:
HOSTNAME = selenium, PORT = 4444, W3CE = true
The legacy values are:
HOSTNAME = localhost, PORT = 9515, W3CE = false
In the existing committed codebase the 'current' Nightwatch variant variables are set to the legacy values, so these are also used for 'max PHP', 'previous minor' and 'previous major' as those variants do not modify anything from 'current'. The 'next minor' and 'next major' both have an override to use the new values.
Proposed resolution
The new w3c driver should now be used for the 'current' and 'max PHP' variants as these run Drupal 11.1. Only the 'previous minor' 11.0 and 'previous major' 10.4 need to use the legacy values.
Specifying the values within the job variant is not entirely reliable, as the core version could be customised. It also leaves future work to be done when 'previous minor' becomes 11.1. So the proposal is to use the Nightwatch version to determine which set of values to use. This is safer, and will work for any customized varants.
Note: This issue and MR257 was originally covering the similar changes required to the webdriver in PHPUnit Javascript tests. But to allow this issue to focus on Nightwatch the PHPUnit changes have been moved to a separate issue [#nnnnnn]
Remaining tasks
Related issue: Issue #3463894