Skip to content

Commit

Permalink
Fixed test scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Oct 14, 2024
1 parent 9798d86 commit fa9112f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/acceptance/BaseAcceptanceCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ public function _before(AcceptanceTester $I): void
'secure' => false,
'httpOnly' => false,
], true);
$I->executeJS('document.documentElement.style.scrollBehavior = "auto !important";');
}
}
3 changes: 3 additions & 0 deletions tests/acceptance/EventCashbookCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private function createEvent(): void
$this->I->click('Akce');
$this->I->executeJs('window.scrollTo(0, document.body.scrollHeight);');
$this->I->waitForText($this->eventName);
$this->I->wait(4);
$this->I->click($this->eventName);
}

Expand Down Expand Up @@ -180,6 +181,8 @@ private function cancelEvent(): void

$this->I->waitForElement($cancelButton);
$this->I->disablePopups();
$this->I->wait(2);
$this->I->executeJs('window.scrollTo(0, document.body.scrollHeight);');
$this->I->click($cancelButton);

$this->I->waitForElementNotVisible($cancelButton);
Expand Down

0 comments on commit fa9112f

Please sign in to comment.