Skip to content

Commit c4d3307

Browse files
authored
Merge pull request #225 from magento/MQE-1142
MQE-1142: Use timeout value when waitForLoadingMaskToDisappear
2 parents b4a27e5 + f267432 commit c4d3307

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,17 @@ public function waitForPageLoad($timeout = null)
367367

368368
$this->waitForJS('return document.readyState == "complete"', $timeout);
369369
$this->waitForAjaxLoad($timeout);
370-
$this->waitForLoadingMaskToDisappear();
370+
$this->waitForLoadingMaskToDisappear($timeout);
371371
}
372372

373373
/**
374374
* Wait for all visible loading masks to disappear. Gets all elements by mask selector, then loops over them.
375375
*
376+
* @param integer $timeout
376377
* @throws \Exception
377378
* @return void
378379
*/
379-
public function waitForLoadingMaskToDisappear()
380+
public function waitForLoadingMaskToDisappear($timeout)
380381
{
381382
foreach (self::$loadingMasksLocators as $maskLocator) {
382383
// Get count of elements found for looping.
@@ -385,7 +386,7 @@ public function waitForLoadingMaskToDisappear()
385386
for ($i = 1; $i <= count($loadingMaskElements); $i++) {
386387
// Formatting and looping on i as we can't interact elements returned above
387388
// eg. (//div[@data-role="spinner"])[1]
388-
$this->waitForElementNotVisible("({$maskLocator})[{$i}]", 30);
389+
$this->waitForElementNotVisible("({$maskLocator})[{$i}]", $timeout);
389390
}
390391
}
391392
}

0 commit comments

Comments
 (0)