Skip to content

Commit

Permalink
add timeout for clickviews
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Jan 2, 2018
1 parent e460d2c commit c5b76a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tests/TestBaseClassWeb.php
Expand Up @@ -287,12 +287,13 @@ protected function openAndFindViewTag($name, $view){

/**
* @param string $name
* @param integer $waitSecondsUntil
* @return WebDriverElement
* @throws \Exception
*/
protected function findViewTag($name)
protected function findViewTag($name,$waitSecondsUntil = 1)
{
$element = self::find(WebDriverBy::id('action::' . $name));
$element = self::find(WebDriverBy::id('action::' . $name),$waitSecondsUntil);
return $element;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/controllers/AdminViewsTest.php
Expand Up @@ -186,8 +186,8 @@ public function testAdminClickViews($name,$view){
$this->openView($url);

try{
self::findAndClick(WebDriverBy::id($view['clickId']),10);
$element = $this->findViewTag($name);
$clickable = self::findAndClick(WebDriverBy::id($view['clickId']),10);
$element = $this->findViewTag($name,10);
$this->assertNotEmpty(
$element,
sprintf(
Expand Down

0 comments on commit c5b76a9

Please sign in to comment.