-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure functional javascript tests can be run #149
base: main
Are you sure you want to change the base?
Conversation
* fix: support drupal 11 * fix: improve code * fix: default installation * fix: update mariadb version to 10.6 * fix: update ddev-gitpod image (latest ddev version) * fix: lazygit binaries * fix: remove legacy settings from gitpod.yml * fix: use DP_CORE_VERSION when there's no issue_fork * fix: reorganize scripts order * Update .gitpod/drupal/drupalpod-setup/ddev_setup.sh Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Allows fallback setup when DrupalPod is called with no DP_PROJECT_TYPE. That is the case when DrupalPod is called without using the browser extension.
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
WalkthroughThe recent updates focus on modifying the PHPUnit configuration and related testing environments within a web project. The primary change involves updating the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- .ddev/commands/web/phpunit (1 hunks)
- .ddev/docker-compose.testing.yaml (1 hunks)
Files skipped from review due to trivial changes (1)
- .ddev/commands/web/phpunit
Additional comments not posted (3)
.ddev/docker-compose.testing.yaml (3)
19-19
: EnsureSIMPLETEST_BASE_URL
is correctly set to match the new environment.This change aligns with the PR's objective to update environment variables for functional testing. Make sure that all references to this URL in the test scripts are updated accordingly.
39-39
: Updated Chrome arguments for WebDriver to enhance performance in headless tests.The arguments provided are standard for optimizing Chrome performance in headless testing environments. This should help in reducing flakiness and improving test reliability.
22-31
: UpdatedMINK_DRIVER_ARGS_WEBDRIVER
to support both legacy and current Chrome options.This update is crucial for backward compatibility with older versions of Drupal. Please ensure to test this configuration on multiple Drupal versions to confirm its effectiveness.
@codebymikey thank you for this PR! I confirm that this PR fixes running I recieved:
What worked for me is (in addition to your changes) to specify MINK_DRIVER_ARGS_WEBDRIVER: >-
[
"chrome",
{
"browserName":"chrome",
"chromeOptions":{"args":["--disable-dev-shm-usage","--disable-gpu","--headless","--dns-prefetch-disable","--no-sandbox"]},
"goog:chromeOptions":{"args":["--disable-dev-shm-usage","--disable-gpu","--headless","--dns-prefetch-disable","--no-sandbox"]}
},
"http://chromedriver:9515"
]
DRUPAL_TEST_WEBDRIVER_CHROME_ARGS: "--disable-dev-shm-usage --disable-gpu --headless --dns-prefetch-disable --no-sandbox" |
@codebymikey or @shaal Would you mind updating the title to "Ensure functional javascript tests can be run"? ( |
(BTW, I'm not sure why Drupalpod isn't using https://github.com/ddev/ddev-selenium-standalone-chrome for this if it's not? That would be the best maintained solution. ) |
The Problem/Issue/Bug
It's currently not possible to run functional tests as the default settings are invalid.
How this PR Solves The Problem
I've updated the default environment variables to more appropriate ones based off what Drupal uses in it's official pipelines.
Implementation notes
The
MINK_DRIVER_ARGS_WEBDRIVER
environment variable supports bothgoog:chromeOptions
andchromeOptions
(legacy) in order to automatically support testing on Drupal <10.3 - https://www.drupal.org/node/3422624We can potentially simplify this to just
goog:chromeOptions
and add an init script which detects< D10.3
, and replaces it withchromeOptions
, but that seemed unnecessarily complicated.Manual Testing Instructions
Set up a drupal project in gitpod.
All the tests will be currently skipped due to the misconfigurations.
Related Issue Link(s)
N/A
Release/Deployment notes
N/A
Summary by CodeRabbit