Skip to content

Commit

Permalink
[BUGFIX] Wait for element in page tree to disappear
Browse files Browse the repository at this point in the history
Currently the clearFilterReloadsPageTreeWithoutFilterApplied
randomly fails due to a still existing element.
This seems to be caused by performance issues in CI.

This is now solved by waiting for the element to actually
disappear.

Resolves: #97749
Releases: main, 11.5
Change-Id: Ib417fc97dcff6ddf0f3c1370ffa419a79f21eba6
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74858
Tested-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
  • Loading branch information
ochorocho authored and sbuerk committed Jun 11, 2022
1 parent dc6cb08 commit edad690
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -46,10 +46,9 @@ public function filterTreeForPage(ApplicationTester $I): void
{
$I->fillField($this->filterInputField, 'Group');
$this->waitForPageTreeLoad($I);
$I->waitForElementNotVisible('//*[text()=\'inline expandsingle\']');
// [#91884] no Enter key press on purpose. The search should start by itself without additional Enter key press
// and this assertion makes sure the filter worked
$I->cantSee('inline expandsingle', $this->inPageTree);
$I->waitForElementNotVisible('//*[text()=\'inline expandsingle\']');

$I->canSee('elements group', $this->inPageTree);
$I->canSee('inline mngroup', $this->inPageTree);
Expand All @@ -72,17 +71,17 @@ public function clearFilterReloadsPageTreeWithoutFilterApplied(ApplicationTester
{
$I->fillField($this->filterInputField, 'Group');
$this->waitForPageTreeLoad($I);
$I->waitForElementNotVisible('//*[text()=\'inline expandsingle\']');

$I->canSee('elements group', $this->inPageTree);
$I->canSee('inline mngroup', $this->inPageTree);
$I->cantSee('inline expandsingle', $this->inPageTree);

$I->pressKey($this->filterInputField, WebDriverKeys::ESCAPE);
$this->waitForPageTreeLoad($I);

$I->waitForElementVisible('//*[text()=\'inline expandsingle\']');
$I->canSee('elements group', $this->inPageTree);
$I->canSee('inline mngroup', $this->inPageTree);
$I->canSee('inline expandsingle', $this->inPageTree);
}

/**
Expand Down

0 comments on commit edad690

Please sign in to comment.