mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
Add a support for Symfony Panther in the JS-based Behats
Co-authored-by: Loic Fremont <lc.fremont@gmail.com>
This commit is contained in:
parent
4b0bc53732
commit
f7aa75f602
6 changed files with 32 additions and 2 deletions
3
.github/workflows/ci_e2e-mysql.yaml
vendored
3
.github/workflows/ci_e2e-mysql.yaml
vendored
|
|
@ -134,6 +134,9 @@ jobs:
|
|||
php_version: ${{ matrix.php }}
|
||||
symfony_version: ${{ matrix.symfony }}
|
||||
|
||||
- name: Install Behat driver
|
||||
run: vendor/bin/bdi detect drivers
|
||||
|
||||
- name: Run Behat
|
||||
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --suite-tags="@ui" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --suite-tags="@ui" --rerun
|
||||
|
||||
|
|
|
|||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -21,6 +21,8 @@ docker-compose.override.yml
|
|||
/behat.yml
|
||||
/phpspec.yml
|
||||
|
||||
/drivers/
|
||||
|
||||
# Symfony CLI https://symfony.com/doc/current/setup/symfony_server.html#different-php-settings-per-project
|
||||
/.php-version
|
||||
/php.ini
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ default:
|
|||
|
||||
extensions:
|
||||
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
|
||||
Robertfausk\Behat\PantherExtension: ~
|
||||
|
||||
FriendsOfBehat\MinkDebugExtension:
|
||||
directory: etc/build
|
||||
|
|
@ -25,7 +26,7 @@ default:
|
|||
files_path: "%paths.base%/src/Sylius/Behat/Resources/fixtures/"
|
||||
base_url: "https://127.0.0.1:8080/"
|
||||
default_session: symfony
|
||||
javascript_session: chrome_headless
|
||||
javascript_session: panther
|
||||
sessions:
|
||||
symfony:
|
||||
symfony: ~
|
||||
|
|
@ -59,6 +60,18 @@ default:
|
|||
firefox:
|
||||
selenium2:
|
||||
browser: firefox
|
||||
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
|
||||
show_auto: false
|
||||
|
||||
FriendsOfBehat\SymfonyExtension: ~
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@
|
|||
"require-dev": {
|
||||
"behat/behat": "^3.6.1",
|
||||
"behat/mink-selenium2-driver": "^1.4",
|
||||
"dbrekelmans/bdi": "^1.1",
|
||||
"consolidation/robo": "^3.0|^4.0",
|
||||
"dmore/behat-chrome-extension": "^1.3",
|
||||
"dmore/chrome-mink-driver": "^2.7",
|
||||
|
|
@ -223,6 +224,7 @@
|
|||
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"rector/rector": "^0.12.20",
|
||||
"robertfausk/behat-panther-extension": "^1.1",
|
||||
"stripe/stripe-php": "^8.1",
|
||||
"sylius-labs/coding-standard": "^4.2",
|
||||
"sylius-labs/suite-tags-extension": "~0.1",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ declare(strict_types=1);
|
|||
namespace Sylius\Behat\Service;
|
||||
|
||||
use Behat\Mink\Driver\DriverInterface;
|
||||
use Behat\Mink\Driver\PantherDriver;
|
||||
use Behat\Mink\Driver\Selenium2Driver;
|
||||
use DMore\ChromeDriver\ChromeDriver;
|
||||
|
||||
|
|
@ -21,7 +22,7 @@ abstract class DriverHelper
|
|||
{
|
||||
public static function isJavascript(DriverInterface $driver): bool
|
||||
{
|
||||
return $driver instanceof Selenium2Driver || $driver instanceof ChromeDriver;
|
||||
return $driver instanceof Selenium2Driver || $driver instanceof ChromeDriver || $driver instanceof PantherDriver;
|
||||
}
|
||||
|
||||
public static function isNotJavascript(DriverInterface $driver): bool
|
||||
|
|
|
|||
|
|
@ -754,6 +754,15 @@
|
|||
"symfony/options-resolver": {
|
||||
"version": "v4.1.3"
|
||||
},
|
||||
"symfony/panther": {
|
||||
"version": "2.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "292a3236e81f55b545b09b9954ab097248972ab3"
|
||||
}
|
||||
},
|
||||
"symfony/password-hasher": {
|
||||
"version": "v5.4.3"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue