Commit 397d0410 authored by lsolesen's avatar lsolesen

Issue #2538642 by mglaman: selecting from selectnav fails randomly3

parent 690f4d84
......@@ -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:
......
{
"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