Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Dev: Open quick actions if hidden (tests)
  • Loading branch information
olleharstedt committed Nov 22, 2017
1 parent e3cf604 commit 3c58dbf
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/controllers/CreateSurveyTest.php
Expand Up @@ -132,10 +132,22 @@ public function testCreateSurvey()
$overview = self::$webDriver->findElement(WebDriverBy::id('sidemenu_1_1'));
$overview->click();

sleep(2);
sleep(1);

// In case quick actions are hidden, show them.
try {
$showquickactions = self::$webDriver->wait(1)->until(
WebDriverExpectedCondition::elementToBeClickable(
WebDriverBy::cssSelector('#survey-action-chevron i.fa-caret-down')
)
);
$showquickactions->click();
} catch (NoSuchElementException $ex) {
// Ignore
}

// Click "Add question".
$addgroup = self::$webDriver->wait(10)->until(
$addgroup = self::$webDriver->wait(5)->until(
WebDriverExpectedCondition::elementToBeClickable(
WebDriverBy::cssSelector('#panel-2 .panel-body-link a')
)
Expand Down

0 comments on commit 3c58dbf

Please sign in to comment.