Skip to content

Commit

Permalink
[Behat] Replace selenium + chromedriver with chrome headless
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed Sep 22, 2020
1 parent 62ad4b9 commit b946e29
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 16 deletions.
16 changes: 14 additions & 2 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ imports:

default:
extensions:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~

Lakion\Behat\MinkDebugExtension:
directory: etc/build
clean_start: false
screenshot: true

Behat\MinkExtension:
files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/"
base_url: "http://localhost:8080/"
base_url: "https://127.0.0.1:8080/"
default_session: symfony
javascript_session: chrome
javascript_session: chrome_headless
sessions:
symfony:
symfony: ~
chrome_headless:
chrome:
api_url: http://127.0.0.1:9222
validate_certificate: false
chrome:
selenium2:
browser: chrome
Expand All @@ -30,6 +36,12 @@ default:
- "start-fullscreen"
- "start-maximized"
- "no-sandbox"
extra_capabilities:
acceptSslCerts: true
acceptInsecureCerts: true
unexpectedAlertBehaviour: accept
goog:chromeOptions:
w3c: false # https://github.com/Sylius/Sylius/issues/10561
firefox:
selenium2:
browser: firefox
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"behat/mink-browserkit-driver": "^1.3",
"behat/mink-extension": "^2.3",
"behat/mink-selenium2-driver": "^1.4",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.1",
Expand Down
43 changes: 29 additions & 14 deletions tests/Application/config/packages/test_cached/doctrine.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
doctrine:
orm:
entity_managers:
default:
result_cache_driver:
type: memcached
host: localhost
port: 11211
query_cache_driver:
type: memcached
host: localhost
port: 11211
metadata_cache_driver:
type: memcached
host: localhost
port: 11211
metadata_cache_driver:
type: service
id: doctrine.system_cache_provider
query_cache_driver:
type: service
id: doctrine.system_cache_provider
result_cache_driver:
type: service
id: doctrine.result_cache_provider

services:
doctrine.result_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.result_cache_pool'
doctrine.system_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.system_cache_pool'

framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

0 comments on commit b946e29

Please sign in to comment.