Nightwatch testing against all opted in versions
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3397270. -->
Reported by: [wim leers](https://www.drupal.org/user/99777)
Related to !78
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<ol>
<li><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3396106" title="Status: Closed (fixed)">#3396106: Allow modules to opt in to testing against Drupal 11 even before they support it</a></span> already landed and added <code>composer (next major)</code> + <code>phpunit (next major)</code>.</li>
<li>Once <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3375359" title="Status: Closed (fixed)">#3375359: Nightwatch tests do not work with the default template: port the approach from core</a></span> is fixed, Nightwatch tests will work out of the box for the current minor.</li>
<li>Once <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3397129" title="Status: Closed (fixed)">#3397129: Allow modules to opt in to testing against Drupal previous major, previous minor, next minor</a></span> is fixed, Nightwatch tests <em>could</em> work for all opted in core versions.</li>
</ol>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ol>
<li>Wait for <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3375359" title="Status: Closed (fixed)">#3375359: Nightwatch tests do not work with the default template: port the approach from core</a></span> to land, then add <code>nightwatch (next major)</code> job.</li>
<li>Wait for <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3397129" title="Status: Closed (fixed)">#3397129: Allow modules to opt in to testing against Drupal previous major, previous minor, next minor</a></span> to land, then add <code>nightwatch (previous major)</code>, <code>nightwatch (previous minor)</code> and <code>nightwatch (next minor)</code> jobs.</li>
</ol>
<p>Acceptance criteria: <em>all</em> customzied and newly added jobs in <a href="https://git.drupalcode.org/project/decoupled_pages/-/blob/8.x-1.x/.gitlab-ci.yml">https://git.drupalcode.org/project/decoupled_pages/-/blob/8.x-1.x/.gitlab-ci.yml</a> <em>disappear</em> and are replaced with a number of <code>OPT_IN_*</code> variables!</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
> Related issue: [Issue #3396106](https://www.drupal.org/node/3396106)
> Related issue: [Issue #3375359](https://www.drupal.org/node/3375359)
> Related issue: [Issue #3397129](https://www.drupal.org/node/3397129)
issue