Commit 4ddcbc56 authored by Lars Olesen's avatar Lars Olesen

Merge pull request #185 from lsolesen/issue-2538642

Issue #2538642 by mglaman: selecting from selectnav3 fails randomly
parents 690f4d84 f7e9d0a8
......@@ -2,7 +2,7 @@ language: php
sudo: false
php:
- 5.4
- 5.6
branches:
except:
......@@ -41,8 +41,6 @@ matrix:
env: UPGRADE=none
- php: 5.5
env: UPGRADE=7.x-2.23 TEST_FEATURES_OVERRIDES=1
- php: 5.6
env: UPGRADE=none
# Cache Composer & Drush directories.
cache:
......@@ -116,6 +114,10 @@ install:
- echo "mysql.connect_timeout=3000" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "default_socket_timeout=3000" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Multibyte string input conversion in PHP is active and must be disabled for Drupal on PHP 5.6.
- echo "mbstring.http_input = pass" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "mbstring.http_output = pass" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Increase the MySQL server timetout and packet size.
- mysql -e "SET GLOBAL wait_timeout = 36000;"
- mysql -e "SET GLOBAL max_allowed_packet = 33554432;"
......
{
"require": {
"drupal/drupal-extension": "3.0.11"
"drupal/drupal-extension": "3.*"
},
"config": {
"bin-dir": "bin/"
......
......@@ -237,12 +237,20 @@ class FeatureContext extends RawDrupalContext implements SnippetAcceptingContext
$this->getSession()->resizeWindow(200, 600, 'current');
}
/**
* @When I select :arg1 from collection dropdown
*/
public function iSelectFromCollectionDropdown($arg1) {
$this->getSession()->wait(5000, 'jQuery("#selectnav3").length > 0');
$this->getSession()->getPage()->selectFieldOption("selectnav3", $arg1);
}
/**
* @BeforeScenario
*/
public function beforeScenario()
{
if (!$this->running_javascript()) {
if (!$this->runningJavascript()) {
return;
}
$this->getSession()->resizeWindow(1440, 900, 'current');
......@@ -253,7 +261,7 @@ class FeatureContext extends RawDrupalContext implements SnippetAcceptingContext
*
* @return boolean
*/
protected function running_javascript() {
protected function runningJavascript() {
return get_class($this->getSession()->getDriver()) !== 'Behat\Mink\Driver\GoutteDriver';
}
}
......@@ -12,5 +12,5 @@ Feature: Responsive product facet search api
And I resize the browser to mobile
# Facets don't react on resize
And I reload the page
When I select "Select a collection..." from "selectnav3"
When I select "To wear (12)" from "selectnav3"
When I select "Select a collection..." from collection dropdown
When I select "To wear (12)" from collection dropdown
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment