Commit 42302cbc authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Christian Kuhn
Browse files

[BUGFIX] Fix scrolling to bottom in UpgradeCest test

The JavaScript method "scrollIntoView" does not work
for elements inside a modal or similar. It only
scrolls the main page.

A quick and easy alternative is to set "scrollTop"
to a very high value.

Resolves: #96070
Releases: master, 11.5
Change-Id: Ic5cea96177442acc57ea78cfa66b698c0dfd0f81
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72280

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 800b4e21
Pipeline #19914 passed with stages
in 55 minutes and 31 seconds
......@@ -88,9 +88,9 @@ class UpgradeCest extends AbstractCest
$I->dontSee($textCurrentFirstPanelHeading, '#version-1');
$I->amGoingTo('mark an item as unread');
$I->executeJS('document.querySelector(".t3js-modal-body").scrollTop = 100000;');
$I->click('#heading-read');
$I->waitForElement('#collapseRead', 5, ModalDialog::$openedModalSelector);
$I->executeJS('document.querySelector("#collapseRead").scrollIntoView();');
$I->see($textCurrentFirstPanelHeading, '#collapseRead');
$I->click('#collapseRead .t3js-changelog-list > div:first-child .t3js-upgradeDocs-unmarkRead');
$I->see($textCurrentFirstPanelHeading, '#version-1');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment