Update Nightwatch jobs to new driver when D11 "current" uses Nightwatch 3
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3475581. -->
Reported by: [jonathan1055](https://www.drupal.org/user/92645)
Related to !257
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>In <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3463894" title="Status: Closed (fixed)">#3463894: Update templates so 11.0 is the default/current branch</a></span> we discovered that the new "current" variant still needs to use the legacy driver, because Core 11.0 uses Nightwatch 2.4, which is <em>not</em> compatible with the W3C Selenium driver.</p>
<p>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.</p>
<h4>Update: 14 November</h4>
<p><code>CORE_STABLE</code> is now used to define the 'current' core version to test against, and this is 11.0.7<br>
<code>CORE_NEXT_MINOR</code> is now defined as '11.1.x-dev', which runs core 11.1.0-dev</p>
<h4>Update: 21 January 2025</h4>
<p><code>CORE_STABLE</code> for 'current' is 11.1.1<br>
<code>CORE_NEXT_MINOR</code> is back to '11.x-dev', which runs core 11.2-dev</p>
<p>Three variables are affected by this change. The new values are:<br>
HOSTNAME = selenium, PORT = 4444, W3CE = true</p>
<p>The legacy values are:<br>
HOSTNAME = localhost, PORT = 9515, W3CE = false</p>
<p>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.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>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.</p>
<p>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.</p>
<p>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]</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
> Related issue: [Issue #3463894](https://www.drupal.org/node/3463894)
issue