Skip to content
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

EWPP-2594: Use selenium 4. #1161

Merged
merged 2 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 3 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ services:
- SPARQL_UPDATE=true
- DBA_PASSWORD=dba
selenium:
image: registry.fpfis.eu/fpfis/selenium:standalone-chrome-3.141.59-oxygen
image: registry.fpfis.eu/fpfis/selenium:standalone-chrome-4.1.3-20220405
environment:
- DISPLAY=:99
- SE_OPTS=-debug
- DISPLAY=:99
- SCREEN_WIDTH=1280
- SCREEN_HEIGHT=800
- SCREEN_WIDTH=1600
- SCREEN_HEIGHT=1200
- NODE_MAX_INSTANCES=5
- NODE_MAX_SESSION=5

Expand Down
28 changes: 27 additions & 1 deletion behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,33 @@ default:
javascript_session: 'selenium2'
selenium2:
wd_host: '${selenium.host}:${selenium.port}/wd/hub'
capabilities: { "browser": "chrome", "version": "*" }
capabilities:
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's start with the minimum set used by QA at https://webgate.ec.europa.eu/fpfis/qa/how-to?search=selenium:

capabilities:
  nativeEvents: true
  marionette: true
  browserName: chrome

browser: chrome
nativeEvents: true
marionette: true
browserName: chrome
version: '*'
extra_capabilities:
loggingPrefs:
performance: ALL
browser: ALL
chromeOptions:
w3c: false
args:
- '--no-sandbox'
- '--start-maximized'
- '--disable-gpu'
- '--window-size=1600,1200'
- '--disable-dev-shm-usage'
- '--disable-setuid-sandbox'
- '--disable-web-security'
- '--DNS-prefetch-disable'
- '--disable-translate'
- '--ignore-certificate-errors'
- '--test-type'
- '--disable-extensions'
- '--incognito'
- '--disable-infobars'
base_url: "${drupal.base_url}"
files_path: "%paths.base%/tests/fixtures/"
Drupal\DrupalExtension:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
# - 3306:3306
# Spawn a Selenium server which also includes a VNC server on localhost:5900 (the password is "secret")
selenium:
image: selenium/standalone-chrome-debug:3.11
image: selenium/standalone-chrome-4.1.3-20220405
environment:
- DISPLAY=:99
- SCREEN_WIDTH=1440
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<env name="SIMPLETEST_BASE_URL" value="${drupal.base_url}"/>
<env name="SIMPLETEST_DB" value="mysql://${drupal.database.user}:${drupal.database.password}@${drupal.database.host}:${drupal.database.port}/${drupal.database.name}"/>
<env name="SIMPLETEST_SPARQL_DB" value="sparql://${drupal.sparql.host}:${drupal.sparql.port}/?module=sparql_entity_storage"/>
<env name="MINK_DRIVER_ARGS_WEBDRIVER" value='["${selenium.browser}", null, "${selenium.host}:${selenium.port}/wd/hub"]'/>
<env name="MINK_DRIVER_ARGS_WEBDRIVER" value='["${selenium.browser}", {"browserName":"chrome","chromeOptions":{"w3c": false, "args":["--no-sandbox", "--start-maximized", "--disable-gpu", "--window-size=1600,1200", "--disable-dev-shm-usage", "--disable-setuid-sandbox", "--disable-web-security", "--DNS-prefetch-disable", "--disable-translate", "--ignore-certificate-errors", "--test-type", "--disable-extensions", "--incognito", "--disable-infobars"]}}, "${selenium.host}:${selenium.port}/wd/hub"]'/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Even Joinup here uses a very basic string:

MINK_DRIVER_ARGS_WEBDRIVER="['chrome', { 'chromeOptions': { 'w3c': false } }, 'http://localhost:4444/wd/hub']"

Let's start with that.

</php>
<extensions>
<extension class="Drupal\Tests\oe_theme\EnsurePHPUnitBatchingTestExtension" />
Expand Down