Skip to content

Commit

Permalink
[Behat] Increased timeout when searching for subitem headers (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon authored Feb 6, 2023
1 parent 4c3a278 commit 0fa6f1d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib/Behat/Component/SubItemsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,20 @@ public function sortBy(string $columnName, bool $ascending): void
return;
}

$header = $this->getHTMLPage()->findAll($this->getLocator('horizontalHeaders'))->getByCriterion(new ElementTextCriterion($columnName));
$header = $this->getHTMLPage()
->setTimeout(3)
->findAll($this->getLocator('horizontalHeaders'))
->getByCriterion(new ElementTextCriterion($columnName));
$header->mouseOver();
usleep(100 * 2500); // 250 ms TODO: Remove after redesign
$header->click();
$isSortedDescending = $this->getHTMLPage()->findAll($this->getLocator('sortingOrderDescending'))->any();

if (!$isSortedDescending && !$ascending) {
$header = $this->getHTMLPage()->findAll($this->getLocator('horizontalHeaders'))->getByCriterion(new ElementTextCriterion($columnName));
$header = $this->getHTMLPage()
->setTimeout(3)
->findAll($this->getLocator('horizontalHeaders'))
->getByCriterion(new ElementTextCriterion($columnName));
$header->mouseOver();
usleep(100 * 2500); // 250 ms TODO: Remove after redesign
$header->click();
Expand Down

0 comments on commit 0fa6f1d

Please sign in to comment.