Add role-aware BDD scenarios, fix Webform CDN-library stalls via the install recipe, and modernize .gitlab-ci.yml
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3591611. --> Reported by: [rajab natshah](https://www.drupal.org/user/1414312) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <ul> <li>Webform admin pages (e.g. <code>/admin/structure/webform/manage/newsletter_subscribe/results/submissions</code>) stall in<br> headless browsers because CodeMirror, Select2, Tabby, Popper, and Tippy load from external CDNs.</li> <li>BDD suite is admin-only &mdash; no role-based access coverage.</li> <li><code>.gitlab-ci.yml</code> uses Node 18 (webship-js &gt;=2.0 requires 20) and <code>admin/admin</code> credentials.</li> </ul> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li><code>recipes/default/recipe.yml</code> &mdash; add <code>config.actions</code> to append<br> <pre>codemirror, jquery.select2, tabby,<br>&nbsp;&nbsp; popperjs, tippyjs</pre><p> to <code>webform.settings.libraries.excluded_libraries</code>.</p></li> <li><code>cucumber.js</code> &mdash; add <code>worldParameters.users</code> registry: Webmaster, Newsletter admin (with<br> <code>rolePermissions</code>), Content editor, Authenticated user.</li> <li><code>tests/step-definitions/webnewsletter.steps.js</code> &mdash; add<br> <pre>Given I am a logged in user with the "&amp;lt;key&amp;gt;"<br>&nbsp; user</pre><p> and <code>Given I add testing users</code> (creates roles, users, and grants <code>rolePermissions</code>).</p></li> <li><code>tests/features/</code> &mdash; 5 files / 20 scenarios &rarr; 6 files / 40 scenarios: <ul> <li><code>01-01-01-admin-login.feature</code> &mdash; 5</li> <li><code>01-02-01-newsletter-subscribe-form.feature</code> &mdash; 6</li> <li><code>02-01-01-admin-subscriber-management.feature</code> &mdash; 9</li> <li><code>02-02-01-email-confirmation.feature</code> &mdash; 5</li> <li><code>03-01-01-access-control.feature</code> &mdash; 5</li> <li><code>04-01-01-role-access-matrix.feature</code> &mdash; 10 (new)</li> </ul> </li> <li><code>.gitlab-ci.yml</code> &mdash; top-level <code>variables</code> + <code>composer</code> override; <code>node:20</code> for<br> cspell/eslint/stylelint; <code>webmaster</code>/<code>dD.123123ddd</code> credentials; drop the redundant <pre>drush<br>&nbsp; config:set</pre><p> step.</p></li> </ul> <h2>How to test</h2> <pre>ddev composer install ddev drush sql:drop -y ddev drush site:install standard \ --account-name=webmaster --account-pass=dD.123123ddd -y ddev drush en webnewsletter -y LAUNCH_URL=https://&lt;project&gt;.ddev.site \ ./node_modules/.bin/cucumber-js --config cucumber.js</pre><p>Expected: <code>40 scenarios (40 passed), 216 steps (216 passed)</code>.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <ul> <li>&#9989; File an issue</li> <li>&#9989; Addition/Change/Update/Fix</li> <li>&#9989; Merge request, Patch, or Commit</li> <li>&#9989; Testing to ensure no regression</li> <li>&#9989; Automated unit testing coverage</li> <li>&#9989; Automated functional testing coverage</li> <li>&#10134; UX/UI designer responsibilities</li> <li>&#10134; Readability</li> <li>&#10134; Accessibility</li> <li>&#10134; Performance</li> <li>&#10134; Security</li> <li>&#10134; Documentation</li> <li>&#9989; Code review by maintainers</li> <li>&#9989; Full testing and approval</li> <li>&#9989; Credit contributors</li> <li>&#9989; Review with the product owner</li> <li>&#9989; Release notes snippet</li> <li>&#9989; Release <a href="https://www.drupal.org/project/webnewsletter/releases/11.0.1">webnewsletter-11.0.1</a></li> </ul> <h3 id="summary-ui-changes">User interface changes</h3> <ul> <li>N/A</li> </ul> <h3 id="summary-api-changes">API changes</h3> <ul> <li>N/A</li> </ul> <h3 id="summary-data-model-changes">Data model changes</h3> <ul> <li>N/A</li> </ul> <h3 id="summary-release-notes">Release notes snippet</h3> <ul> <li>ci: <a href="https://www.drupal.org/i/3591611">#3591611</a> Add role-aware BDD scenarios, fix Webform CDN-library stalls via the install recipe, and modernize .gitlab-ci.yml</li> </ul>
issue