mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-03 03:37:12 +00:00
[Behat] Convert main config from YAML to PHP
Co-Authored-By: Loïc Frémont <lc.fremont@gmail.com>
This commit is contained in:
parent
85334cf853
commit
0207fcc153
5 changed files with 133 additions and 94 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,5 @@
|
|||
###> project files ###
|
||||
/behat.yml
|
||||
/behat.php
|
||||
/composer.lock
|
||||
/docker-compose.override.yml
|
||||
/public/media
|
||||
|
|
|
|||
108
behat.dist.php
Normal file
108
behat.dist.php
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Sylius Sp. z o.o.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Behat\Config\Config;
|
||||
use Behat\Config\Extension;
|
||||
use Behat\Config\Filter\TagFilter;
|
||||
use Behat\Config\Formatter\PrettyFormatter;
|
||||
use Behat\Config\Profile;
|
||||
use Behat\Config\TesterOptions;
|
||||
use Behat\MinkExtension\ServiceContainer\MinkExtension;
|
||||
use DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension;
|
||||
use FriendsOfBehat\MinkDebugExtension\ServiceContainer\MinkDebugExtension;
|
||||
use FriendsOfBehat\SymfonyExtension\ServiceContainer\SymfonyExtension;
|
||||
use FriendsOfBehat\VariadicExtension\ServiceContainer\VariadicExtension;
|
||||
use Robertfausk\Behat\PantherExtension\ServiceContainer\PantherExtension;
|
||||
use Sylius\Bundle\ApiBundle\Behat\Extension\SyliusApiBundleExtension;
|
||||
use SyliusLabs\SuiteTagsExtension\ServiceContainer\SuiteTagsExtension;
|
||||
|
||||
return (new Config())
|
||||
->import('src/Sylius/Behat/Resources/config/suites.php')
|
||||
->withProfile(
|
||||
(new Profile('default'))
|
||||
->withFormatter(new PrettyFormatter(paths: false))
|
||||
->withFilter(new TagFilter('~@todo&&~@cli'))
|
||||
->withTesterOptions((new TesterOptions())
|
||||
->withErrorReporting(\E_ALL & ~(\E_DEPRECATED | \E_USER_DEPRECATED)))
|
||||
->withExtension(new Extension(ChromeExtension::class))
|
||||
->withExtension(new Extension(PantherExtension::class))
|
||||
->withExtension(new Extension(MinkDebugExtension::class, [
|
||||
'directory' => 'etc/build',
|
||||
'clean_start' => false,
|
||||
'screenshot' => true,
|
||||
]))
|
||||
->withExtension(new Extension(MinkExtension::class, [
|
||||
'files_path' => '%paths.base%/src/Sylius/Behat/Resources/fixtures/',
|
||||
'base_url' => 'http://127.0.0.1:8080/',
|
||||
'default_session' => 'symfony',
|
||||
'javascript_session' => 'panther',
|
||||
'sessions' => [
|
||||
'symfony' => [
|
||||
'symfony' => null,
|
||||
],
|
||||
'chromedriver' => [
|
||||
'chrome' => [
|
||||
'api_url' => 'http://127.0.0.1:9222',
|
||||
'validate_certificate' => false,
|
||||
],
|
||||
],
|
||||
'chrome_headless_second_session' => [
|
||||
'chrome' => [
|
||||
'api_url' => 'http://127.0.0.1:9222',
|
||||
'validate_certificate' => false,
|
||||
],
|
||||
],
|
||||
'panther' => [
|
||||
'panther' => [
|
||||
'manager_options' => [
|
||||
'connection_timeout_in_ms' => 5000,
|
||||
'request_timeout_in_ms' => 120000,
|
||||
'chromedriver_arguments' => [
|
||||
'--log-path=etc/build/chromedriver.log',
|
||||
'--verbose',
|
||||
],
|
||||
'capabilities' => [
|
||||
'acceptSslCerts' => true,
|
||||
'acceptInsecureCerts' => true,
|
||||
'unexpectedAlertBehaviour' => 'accept',
|
||||
'goog:chromeOptions' => [
|
||||
'args' => [
|
||||
'--user-data-dir=/tmp/panther-chrome-data',
|
||||
'--window-size=1920,1200',
|
||||
'--no-sandbox',
|
||||
'--disable-dev-shm-usage',
|
||||
'--disable-gpu',
|
||||
'--disable-infobars',
|
||||
'--disable-features=TranslateUI',
|
||||
'--disable-translate',
|
||||
'--disable-popup-blocking',
|
||||
'--disable-blink-features=AutomationControlled',
|
||||
'--disable-component-extensions-with-background-pages',
|
||||
'--disable-background-networking',
|
||||
'--disable-dev-tools',
|
||||
'--disable-extensions',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'show_auto' => false,
|
||||
]))
|
||||
->withExtension(new Extension(SymfonyExtension::class))
|
||||
->withExtension(new Extension(VariadicExtension::class))
|
||||
->withExtension(new Extension(SuiteTagsExtension::class))
|
||||
->withExtension(new Extension(SyliusApiBundleExtension::class)),
|
||||
)
|
||||
;
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Sylius Sp. z o.o.
|
||||
|
||||
# This file is referenced in Sylius-Standard v1.0.0 - v1.3.x
|
||||
|
||||
imports:
|
||||
- src/Sylius/Behat/Resources/config/suites.yml
|
||||
|
||||
default:
|
||||
calls:
|
||||
error_reporting: 8191 # E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
|
||||
|
||||
formatters:
|
||||
pretty:
|
||||
verbose: true
|
||||
paths: false
|
||||
snippets: false
|
||||
|
||||
extensions:
|
||||
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
|
||||
Robertfausk\Behat\PantherExtension: ~
|
||||
|
||||
FriendsOfBehat\MinkDebugExtension:
|
||||
directory: etc/build
|
||||
clean_start: false
|
||||
screenshot: true
|
||||
|
||||
Behat\MinkExtension:
|
||||
files_path: "%paths.base%/src/Sylius/Behat/Resources/fixtures/"
|
||||
base_url: "http://127.0.0.1:8080/"
|
||||
default_session: symfony
|
||||
javascript_session: panther
|
||||
sessions:
|
||||
symfony:
|
||||
symfony: ~
|
||||
chromedriver:
|
||||
chrome:
|
||||
api_url: http://127.0.0.1:9222
|
||||
validate_certificate: false
|
||||
chrome_headless_second_session:
|
||||
chrome:
|
||||
api_url: http://127.0.0.1:9222
|
||||
validate_certificate: false
|
||||
panther:
|
||||
panther:
|
||||
manager_options:
|
||||
connection_timeout_in_ms: 5000
|
||||
request_timeout_in_ms: 120000
|
||||
chromedriver_arguments:
|
||||
- --log-path=etc/build/chromedriver.log
|
||||
- --verbose
|
||||
capabilities:
|
||||
acceptSslCerts: true
|
||||
acceptInsecureCerts: true
|
||||
unexpectedAlertBehaviour: accept
|
||||
goog:chromeOptions:
|
||||
args:
|
||||
- --user-data-dir=/tmp/panther-chrome-data
|
||||
- --window-size=1920,1200
|
||||
- --no-sandbox
|
||||
- --disable-dev-shm-usage
|
||||
- --disable-gpu
|
||||
- --disable-infobars
|
||||
- --disable-features=TranslateUI
|
||||
- --disable-translate
|
||||
- --disable-popup-blocking
|
||||
- --disable-blink-features=AutomationControlled
|
||||
- --disable-component-extensions-with-background-pages
|
||||
- --disable-background-networking
|
||||
- --disable-dev-tools
|
||||
- --disable-extensions
|
||||
show_auto: false
|
||||
|
||||
FriendsOfBehat\SymfonyExtension: ~
|
||||
|
||||
FriendsOfBehat\VariadicExtension: ~
|
||||
|
||||
SyliusLabs\SuiteTagsExtension: ~
|
||||
|
||||
Sylius\Bundle\ApiBundle\Behat\Extension\SyliusApiBundleExtension: ~
|
||||
|
||||
gherkin:
|
||||
filters:
|
||||
tags: "~@todo&&~@cli" # CLI is excluded as it registers an error handler that mutes fatal errors
|
||||
24
src/Sylius/Behat/Resources/config/suites.php
Normal file
24
src/Sylius/Behat/Resources/config/suites.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Sylius Sp. z o.o.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Behat\Config\Config;
|
||||
|
||||
return (new Config())
|
||||
->import([
|
||||
'suites/api.yml',
|
||||
'suites/cli.yml',
|
||||
'suites/domain.yml',
|
||||
'suites/hybrid.yml',
|
||||
'suites/ui.yml',
|
||||
])
|
||||
;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Sylius Sp. z o.o.
|
||||
|
||||
imports:
|
||||
- suites/api.yml
|
||||
- suites/cli.yml
|
||||
- suites/domain.yml
|
||||
- suites/hybrid.yml
|
||||
- suites/ui.yml
|
||||
Loading…
Add table
Reference in a new issue