Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(test): fix random fails on widget and module installation
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret committed Nov 16, 2018
1 parent 80ef75e commit 3270983
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions features/bootstrap/ModuleContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ public function iRemoveTheModule()
*/
public function theModuleIsInstalled()
{
//wait the widget is installed
sleep(2);

// initialize page to manage iframe selection
$this->page = new ModuleListingPage($this);

$module = $this->page->getEntry($this->moduleName);
if ($module['actions']['install']) {
throw new \Exception('Module ' . $this->moduleName . ' is not installed.');
Expand Down
7 changes: 4 additions & 3 deletions features/bootstrap/WidgetContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ public function iRemoveTheWidget()
*/
public function theWidgetIsInstalled()
{

//wait the iframe
//wait the widget is installed
sleep(2);

// initialize page to manage iframe selection
$this->page = new WidgetListingPage($this);

$this->spin(
function ($context) {
$context->getSession()->getDriver()->switchToIFrame("main-content");
$widget = $context->page->getEntry($context->widgetName);
return !$widget['actions']['install'];
},
Expand Down

0 comments on commit 3270983

Please sign in to comment.