Skip to content

Commit 78bcb68

Browse files
committed
MAGETWO-65534: Unstable Tests in L4 Functional Tests EE build on mainline develop: AddToCartCrossSellTest, NavigateUpSellProductsTest, NavigateRelatedProductsTest
1 parent e738316 commit 78bcb68

File tree

1 file changed

+18
-0
lines changed
  • dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml

1 file changed

+18
-0
lines changed

dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ public function searchAndSelect(array $filter)
275275
{
276276
$this->search($filter);
277277
$rowItem = $this->getRow($filter);
278+
$this->waitUntilRowIsVisible($rowItem);
278279
if ($rowItem->isVisible()) {
279280
$rowItem->find($this->selectItem)->click();
280281
} else {
@@ -283,6 +284,23 @@ public function searchAndSelect(array $filter)
283284
$this->waitLoader();
284285
}
285286

287+
/**
288+
* Wait for row is visible in the grid.
289+
*
290+
* @param \Magento\Mtf\Client\ElementInterface $rowItem
291+
* @return bool
292+
*/
293+
private function waitUntilRowIsVisible($rowItem)
294+
{
295+
$locator = $rowItem->getLocator()['value'];
296+
$strategy = $rowItem->getLocator()['using'];
297+
$this->_rootElement->waitUntil(
298+
function () use ($locator, $strategy) {
299+
return $this->browser->find($locator, $strategy)->isVisible();
300+
}
301+
);
302+
}
303+
286304
/**
287305
* Perform selected massaction over checked items.
288306
*

0 commit comments

Comments
 (0)