Commit b843e0da authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[TASK] Streamline tab-handling in ElementsBasicInput cests

* Avoid scrollIntoView which is no longer needed since #96947

* Do not catch exceptions on tab-click in ElementsBasicInputRangeCest
  which has been introduced in #93629, but actually didn't catch the
  documented case where the tab was already active (no exception in
  that case). It was actually only triggered when the tab was
  scrolled away. Again no longer needed due to #96947.

Resolves: #96951
Related: #96947
Related: #93629
Releases: main, 11.5
Change-Id: I787960ea5dd8a6c946e090d90c4c9d2ecb950e68
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73583


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
parent c850141e
......@@ -49,11 +49,9 @@ class ElementsBasicInputDateCest extends AbstractElementsBasicCest
$I->waitForElementNotVisible('#t3js-ui-block');
$I->waitForText('Edit Form', 3, 'h1');
// scroll up all the way to get a clean shot to the tab panel
$I->executeJS('document.querySelector(".t3js-tabs").scrollIntoView({block: "end"});');
// Make sure the test operates on the "inputDateTime" tab
$I->click('inputDateTime');
$I->waitForText('inputDateTime', 3);
}
/**
......
......@@ -47,9 +47,7 @@ class ElementsBasicInputEvalCest extends AbstractElementsBasicCest
$I->waitForElementNotVisible('#t3js-ui-block');
$I->waitForText('Edit Form', 3, 'h1');
// scroll up all the way to get a clean shot to the tab panel
$I->executeJS('document.querySelector(".t3js-tabs").scrollIntoView({block: "end"});');
// Make sure the test operates on the "input" tab
$I->click('input');
}
......
......@@ -18,8 +18,6 @@ declare(strict_types=1);
namespace TYPO3\CMS\Core\Tests\Acceptance\Application\FormEngine;
use Codeception\Example;
use Facebook\WebDriver\Exception\ElementClickInterceptedException;
use Facebook\WebDriver\Exception\UnknownServerException;
use TYPO3\CMS\Core\Tests\Acceptance\Support\ApplicationTester;
use TYPO3\CMS\Core\Tests\Acceptance\Support\Helper\PageTree;
......@@ -49,13 +47,8 @@ class ElementsBasicInputRangeCest extends AbstractElementsBasicCest
$I->waitForElementNotVisible('#t3js-ui-block');
$I->waitForText('Edit Form', 3, 'h1');
try {
// make sure the test operates on the input tab
// Make sure the test operates on the "input" tab
$I->click('input');
$I->waitForText('input', 3);
} catch (ElementClickInterceptedException|UnknownServerException $exception) {
// nothing to do, the tab is already active
}
}
/**
......
......@@ -51,9 +51,8 @@ class ElementsBasicInputTextTableCest extends AbstractElementsBasicCest
$I->waitForElementNotVisible('#t3js-ui-block');
$I->waitForText('Edit Form', 3, 'h1');
// scroll up all the way to get a clean shot to the tab panel
$I->executeJS('document.querySelector(".module h1").scrollIntoView({ block: "end" });');
// Make sure the test operates on the "text" tab
$I->click('text');
}
......
Supports Markdown
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