Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .vortex/installer/tests/Fixtures/install/_baseline/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ default:
extra_capabilities:
"goog:chromeOptions":
args:
- '--disable-gpu' # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
# Options to increase stability and speed.
- '--disable-extensions' # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
- '--disable-infobars' # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
- '--disable-popup-blocking' # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
- '--disable-translate' # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
- '--no-first-run' # Skips the initial setup screen that Chrome typically shows when running for the first time.
- '--test-type' # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.
- '--disable-extensions' # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
- '--disable-gpu' # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
- '--disable-infobars' # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
- '--disable-popup-blocking' # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
- '--disable-translate' # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
- '--force-prefers-reduced-motion' # Forces Chrome to respect prefers-reduced-motion CSS media query, disabling animations and transitions.
- '--no-first-run' # Skips the initial setup screen that Chrome typically shows when running for the first time.
- '--test-type' # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.

# Provides integration with Drupal APIs.
Drupal\DrupalExtension:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@@ -51,9 +51,9 @@
@@ -52,9 +52,9 @@
api_driver: drupal
drush_driver: drush
drupal:
Expand Down
15 changes: 8 additions & 7 deletions behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ default:
extra_capabilities:
"goog:chromeOptions":
args:
- '--disable-gpu' # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
# Options to increase stability and speed.
- '--disable-extensions' # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
- '--disable-infobars' # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
- '--disable-popup-blocking' # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
- '--disable-translate' # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
- '--no-first-run' # Skips the initial setup screen that Chrome typically shows when running for the first time.
- '--test-type' # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.
- '--disable-extensions' # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
- '--disable-gpu' # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
- '--disable-infobars' # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Re-evaluate --disable-gpu usage in modern headless runs

In modern Chrome headless (--headless=new), --disable-gpu is generally unnecessary; Chrome won’t attempt to use a GPU. Keeping it doesn’t usually hurt, but it’s redundant and can be removed to simplify the set. If you keep it, tweak the comment for clarity.

Apply this diff to improve the comment:

-                - '--disable-gpu'                  # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
+                - '--disable-gpu'                  # Redundant in modern headless Chrome; safe to remove. Keep only if running non-headless in environments without GPU.

If your environment is non-headless (e.g., XVFB), keeping --disable-gpu may still be useful. Please confirm how Chrome is launched in your Selenium container.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In behat.yml around line 42, the comment for the Chrome flag `--disable-gpu`
should be updated: either remove the `--disable-gpu` flag if you run Chrome with
modern headless mode (`--headless=new`) because it’s redundant, or keep the flag
but change the comment to note it’s only needed for non-headless or XVFB
environments; also add a short verification note requesting confirmation of how
Chrome is launched in the Selenium container (headless vs XVFB) so the team can
decide to remove or retain the flag.

- '--disable-popup-blocking' # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Beware of broad --disable-popup-blocking; can surface non-deterministic popups

Allowing all popups can introduce flakiness if the app (or extensions, though disabled) triggers unexpected windows/tabs. Prefer opening required popups via explicit user gestures in tests and keep blocking on, unless you have known flows that depend on popups.

If no scenarios truly require popups, consider removing this flag. Otherwise, add a Behat step guard that closes/handles new windows deterministically after the popup-triggering action.

I can propose a small helper in FeatureContext to detect and close unexpected windows if needed.

🤖 Prompt for AI Agents
In behat.yml around line 43, the configuration includes the broad
'--disable-popup-blocking' flag which may allow unexpected popups and introduce
flakiness; remove this flag if no scenarios require popups, or keep it only when
needed and add deterministic handling in tests. If popups are required, revert
the flag to keep blocking by default and implement a Behat step/helper in
FeatureContext that, immediately after the action that triggers a popup, detects
any new window handles and closes or switches back to the main window
programmatically to ensure deterministic behavior; alternatively, add a guarded
step to explicitly open popups via simulated user gestures so tests remain
stable.

- '--disable-translate' # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
- '--force-prefers-reduced-motion' # Forces Chrome to respect prefers-reduced-motion CSS media query, disabling animations and transitions.
- '--no-first-run' # Skips the initial setup screen that Chrome typically shows when running for the first time.
- '--test-type' # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.
Comment on lines +40 to +47
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Minor copy edits in comments for precision

Two comment tweaks improve clarity.

-                - '--disable-extensions'           # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
+                - '--disable-extensions'           # Disables all Chrome extensions to avoid interference during tests.
-                - '--force-prefers-reduced-motion' # Forces Chrome to respect prefers-reduced-motion CSS media query, disabling animations and transitions.
+                - '--force-prefers-reduced-motion' # Forces prefers-reduced-motion: reduce; helps disable animations/transitions for deterministic timing.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- '--disable-extensions' # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
- '--disable-gpu' # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
- '--disable-infobars' # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
- '--disable-popup-blocking' # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
- '--disable-translate' # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
- '--force-prefers-reduced-motion' # Forces Chrome to respect prefers-reduced-motion CSS media query, disabling animations and transitions.
- '--no-first-run' # Skips the initial setup screen that Chrome typically shows when running for the first time.
- '--test-type' # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.
- '--disable-extensions' # Disables all Chrome extensions to avoid interference during tests.
- '--disable-gpu' # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
- '--disable-infobars' # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
- '--disable-popup-blocking' # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
- '--disable-translate' # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
- '--force-prefers-reduced-motion' # Forces prefers-reduced-motion: reduce; helps disable animations/transitions for deterministic timing.
- '--no-first-run' # Skips the initial setup screen that Chrome typically shows when running for the first time.
- '--test-type' # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.
🤖 Prompt for AI Agents
In behat.yml around lines 40 to 47, two comment lines need minor copy edits for
precision: update the '--disable-infobars' comment to clearly state it hides
Chrome's automation/info bar used for automation warnings (e.g., "Hides Chrome's
infobar that notifies about automation or other messages."), and tighten the
'--test-type' comment to indicate it suppresses test-related security warnings
and should be used cautiously (e.g., "Suppresses security/UI warnings related to
automated testing; use with caution."). Apply these two concise comment
replacements to improve clarity.

🧹 Nitpick (assertive)

Consider adding headless, fixed viewport, and /dev/shm mitigations for CI stability

For deterministic layouts and fewer CI crashes in containerized environments, it’s typical to include a fixed window size and mitigate shared memory limits. Also, if your stack isn’t already forcing headless via the Selenium image, setting it explicitly improves reproducibility.

Apply this diff to extend the args list:

               args:
                 # Options to increase stability and speed.
                 - '--disable-extensions'           # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
                 - '--disable-gpu'                  # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
                 - '--disable-infobars'             # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
                 - '--disable-popup-blocking'       # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
                 - '--disable-translate'            # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
                 - '--force-prefers-reduced-motion' # Forces Chrome to respect prefers-reduced-motion CSS media query, disabling animations and transitions.
                 - '--no-first-run'                 # Skips the initial setup screen that Chrome typically shows when running for the first time.
                 - '--test-type'                    # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.
+                - '--disable-dev-shm-usage'        # Avoid crashes when /dev/shm is small in Docker; write shared memory files to /tmp instead.
+                - '--headless=new'                 # Ensure headless mode explicitly for CI consistency (Chrome 109+).
+                - '--window-size=1365,768'         # Fixed viewport for deterministic responsive breakpoints and screenshots.

Note: if the Selenium image already runs Chrome headless, including --headless=new is harmless and documents intent.

If you prefer not to enable headless, at least keep --window-size=... to stabilize breakpoints and screenshot dimensions.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- '--disable-extensions' # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
- '--disable-gpu' # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
- '--disable-infobars' # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
- '--disable-popup-blocking' # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
- '--disable-translate' # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
- '--force-prefers-reduced-motion' # Forces Chrome to respect prefers-reduced-motion CSS media query, disabling animations and transitions.
- '--no-first-run' # Skips the initial setup screen that Chrome typically shows when running for the first time.
- '--test-type' # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.
args:
# Options to increase stability and speed.
- '--disable-extensions' # Disables all installed Chrome extensions. Useful in testing environments to avoid interference from extensions.
- '--disable-gpu' # Disables hardware acceleration required in containers and cloud-based instances (like CI runners) where GPU is not available.
- '--disable-infobars' # Hides the infobar that Chrome displays for various notifications, like warnings when opening multiple tabs.
- '--disable-popup-blocking' # Disables the popup blocker, allowing all popups to appear. Useful in testing scenarios where popups are expected.
- '--disable-translate' # Disables the built-in translation feature, preventing Chrome from offering to translate pages.
- '--force-prefers-reduced-motion' # Forces Chrome to respect prefers-reduced-motion CSS media query, disabling animations and transitions.
- '--no-first-run' # Skips the initial setup screen that Chrome typically shows when running for the first time.
- '--test-type' # Disables certain security features and UI components that are unnecessary for automated testing, making Chrome more suitable for test environments.
- '--disable-dev-shm-usage' # Avoid crashes when /dev/shm is small in Docker; write shared memory files to /tmp instead.
- '--headless=new' # Ensure headless mode explicitly for CI consistency (Chrome 109+).
- '--window-size=1365,768' # Fixed viewport for deterministic responsive breakpoints and screenshots.
🤖 Prompt for AI Agents
In behat.yml around lines 40-47, the Chrome args lack explicit headless, fixed
viewport and /dev/shm mitigations which improve CI stability; append flags to
the args list: add --headless=new (or omit if you deliberately don’t want
headless), add a fixed window size such as --window-size=1366,768 to stabilize
layouts/screenshots, and add --disable-dev-shm-usage to mitigate container
shared-memory crashes; update the YAML args array to include those three flags
(or at minimum keep --window-size if you opt out of headless).


# Provides integration with Drupal APIs.
Drupal\DrupalExtension:
Expand Down