Skip to content

Commit

Permalink
[Behat] Increased go to the top timeout (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon authored Mar 22, 2022
1 parent 7a29a3a commit 664d66c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/Behat/Component/Pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ public function clickNextButton(): void
$currentPage = (int) $this->getHTMLPage()->find($this->getLocator('currentPage'))->getText();
// scroll to the bottom to avoid "Go to top" button
$this->getHTMLPage()->executeJavaScript("document.querySelector('.ibexa-back-to-top-scroll-container').scrollTo(0, document.querySelector('.ibexa-back-to-top-scroll-container').scrollHeight)");
$this->getHTMLPage()->find(new VisibleCSSLocator('backToTopWithTitle', '.ibexa-back-to-top__title--visible'))->assert()->textEquals('Go to top');
$this->getHTMLPage()
->setTimeout(3)
->find(new VisibleCSSLocator('backToTopWithTitle', '.ibexa-back-to-top__title--visible'))
->assert()->textEquals('Go to top');
$this->getHTMLPage()->find($this->getLocator('nextButton'))->click();
$this->getHTMLPage()->setTimeout(10)->waitUntil(function () use ($currentPage) {
$activePge = (int) $this->getHTMLPage()->find($this->getLocator('currentPage'))->getText();
Expand Down

0 comments on commit 664d66c

Please sign in to comment.