From 32c355918c03e87406d28ab7e4dd20c4a6af5057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grzona?= Date: Thu, 27 Apr 2017 11:58:09 +0200 Subject: [PATCH 1/9] Selenium2 configuration to accept unexpectedAlertBehavior option --- .../MinkExtension/ServiceContainer/Driver/Selenium2Factory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php b/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php index 5fc4595e..18565088 100644 --- a/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php +++ b/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php @@ -93,6 +93,7 @@ protected function getCapabilitiesNode() ->addDefaultsIfNotSet() ->normalizeKeys(false) ->children() + ->scalarNode('unexpectedAlertBehavior')->defaultValue('ignore')->end() ->scalarNode('browserName')->end() ->scalarNode('version')->end() ->scalarNode('platform')->end() From 78a97899d4019f76291d8a8c407923e100972609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grzona?= Date: Thu, 27 Apr 2017 12:32:10 +0200 Subject: [PATCH 2/9] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2e721d13..78918a32 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "behat/mink-extension", + "name": "gforces-pl/mink-extension", "type": "behat-extension", "description": "Mink extension for Behat", "keywords": ["web", "test", "browser", "gui"], From 7d4f0cfc85799b366cb19c4ac752e49b1abb3541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grzona?= Date: Thu, 27 Apr 2017 12:42:18 +0200 Subject: [PATCH 3/9] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 78918a32..2e721d13 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "gforces-pl/mink-extension", + "name": "behat/mink-extension", "type": "behat-extension", "description": "Mink extension for Behat", "keywords": ["web", "test", "browser", "gui"], From 69c35f316d62a34559210fae3b0d75b4db203a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grzona?= Date: Fri, 28 Apr 2017 10:05:28 +0200 Subject: [PATCH 4/9] Update Selenium2Factory.php --- .../MinkExtension/ServiceContainer/Driver/Selenium2Factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php b/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php index 18565088..8d4a048f 100644 --- a/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php +++ b/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php @@ -93,7 +93,7 @@ protected function getCapabilitiesNode() ->addDefaultsIfNotSet() ->normalizeKeys(false) ->children() - ->scalarNode('unexpectedAlertBehavior')->defaultValue('ignore')->end() + ->scalarNode('unexpectedAlertBehaviour')->defaultValue('ignore')->end() ->scalarNode('browserName')->end() ->scalarNode('version')->end() ->scalarNode('platform')->end() From 38e963834c894534d00821581669d21f11fe1ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grzona?= Date: Wed, 12 Dec 2018 10:31:44 +0100 Subject: [PATCH 5/9] Removed default value of the unexpectedAlertBehavior option of Selenium2 driver --- .../MinkExtension/ServiceContainer/Driver/Selenium2Factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php b/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php index 8d4a048f..9481902f 100644 --- a/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php +++ b/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php @@ -93,7 +93,7 @@ protected function getCapabilitiesNode() ->addDefaultsIfNotSet() ->normalizeKeys(false) ->children() - ->scalarNode('unexpectedAlertBehaviour')->defaultValue('ignore')->end() + ->scalarNode('unexpectedAlertBehaviour')->end() ->scalarNode('browserName')->end() ->scalarNode('version')->end() ->scalarNode('platform')->end() From 65ef90548ae32468d53d21facdfe759cbbd8546b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grzona?= Date: Tue, 28 Sep 2021 11:22:33 +0200 Subject: [PATCH 6/9] Update version packages --- .gitignore | 1 + composer.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e3897102..4efc1340 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.phar composer.lock vendor +.idea diff --git a/composer.json b/composer.json index 2e721d13..861e483a 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,11 @@ "php": ">=5.3.2", "behat/behat": "~3.0,>=3.0.5", "behat/mink": "~1.5", - "symfony/config": "~2.2|~3.0" + "symfony/config": "^5.2" }, "require-dev": { - "phpspec/phpspec": "~2.0", + "phpspec/phpspec": ">=2.0", "behat/mink-goutte-driver": "~1.1" }, From 837d0ec1131b67307f1a48e0772a00835a446d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grzona?= Date: Tue, 28 Sep 2021 11:24:07 +0200 Subject: [PATCH 7/9] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2e721d13..861e483a 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,11 @@ "php": ">=5.3.2", "behat/behat": "~3.0,>=3.0.5", "behat/mink": "~1.5", - "symfony/config": "~2.2|~3.0" + "symfony/config": "^5.2" }, "require-dev": { - "phpspec/phpspec": "~2.0", + "phpspec/phpspec": ">=2.0", "behat/mink-goutte-driver": "~1.1" }, From 43a46c58a8b981e9d16e6540f94f09b1fbbfcb51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Grzona?= Date: Tue, 17 May 2022 14:38:52 +0200 Subject: [PATCH 8/9] Merge origin in; resolve conflicts --- .DS_Store | Bin 6148 -> 6148 bytes .gitignore | 1 + 2 files changed, 1 insertion(+) diff --git a/.DS_Store b/.DS_Store index 9971fc1766b6781ad269605e5c089a760d07a3a6..2959e158dbda8360b9c3f4e9030aa1ba3690c57b 100644 GIT binary patch delta 261 zcmZoMXffEJ%2Lmf;LO0lz`~%%kj{|FP?DSP;*yk;p9B=+@X@YOe<*px5mi0~uY5s< zVQ_MOZUIma0|UpJkFXx9 vV)9cK3&!u0 Date: Tue, 17 May 2022 16:14:27 +0200 Subject: [PATCH 9/9] Update goutte driver factory --- .../ServiceContainer/Driver/GoutteFactory.php | 54 +------------------ 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php b/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php index fb10d889..2b5036c7 100644 --- a/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php +++ b/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php @@ -68,64 +68,12 @@ public function buildDriver(array $config) ); } - if ($this->isGoutte1()) { - $guzzleClient = $this->buildGuzzle3Client($config['guzzle_parameters']); - } elseif ($this->isGuzzle6()) { - $guzzleClient = $this->buildGuzzle6Client($config['guzzle_parameters']); - } else { - $guzzleClient = $this->buildGuzzle4Client($config['guzzle_parameters']); - } - $clientDefinition = new Definition('Behat\Mink\Driver\Goutte\Client', array( - $config['server_parameters'], + $config['server_parameters'] ?: null, )); - $clientDefinition->addMethodCall('setClient', array($guzzleClient)); return new Definition('Behat\Mink\Driver\GoutteDriver', array( $clientDefinition, )); } - - private function buildGuzzle6Client(array $parameters) - { - // Force the parameters set by default in Goutte to reproduce its behavior - $parameters['allow_redirects'] = false; - $parameters['cookies'] = true; - - return new Definition('GuzzleHttp\Client', array($parameters)); - } - - private function buildGuzzle4Client(array $parameters) - { - // Force the parameters set by default in Goutte to reproduce its behavior - $parameters['allow_redirects'] = false; - $parameters['cookies'] = true; - - return new Definition('GuzzleHttp\Client', array(array('defaults' => $parameters))); - } - - private function buildGuzzle3Client(array $parameters) - { - // Force the parameters set by default in Goutte to reproduce its behavior - $parameters['redirect.disable'] = true; - - return new Definition('Guzzle\Http\Client', array(null, $parameters)); - } - - private function isGoutte1() - { - $refl = new \ReflectionParameter(array('Goutte\Client', 'setClient'), 0); - - if ($refl->getClass() && 'Guzzle\Http\ClientInterface' === $refl->getClass()->getName()) { - return true; - } - - return false; - } - - private function isGuzzle6() - { - return interface_exists('GuzzleHttp\ClientInterface') && - version_compare(\GuzzleHttp\ClientInterface::VERSION, '6.0.0', '>='); - } }