Skip to content

Commit

Permalink
[TASK] Fix flaky Acceptance Tests
Browse files Browse the repository at this point in the history
The current default timeout to wait for elements is 10 seconds.
Turn up to 30 sec to stabilize the situation.

Change-Id: I2dd6cbe14a7d05cfe3cf6f7ad3437e0b235c96f1
Resolves: #83836
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/55634
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
Anja Leichsenring authored and bmack committed Feb 10, 2018
1 parent 8ac3aeb commit 35e4d4e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,24 @@ public function changeInline1nInlineInput(Admin $I)
*/
public function deleteInline1nInlineElement(Admin $I, ModalDialog $modalDialog)
{
$inlineElmentToDelete = '#data-52-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div';
$inlineElementToDelete = '#data-52-tx_styleguide_inline_1n-1-inline_1-tx_styleguide_inline_1n_child-1_div';
$I->wantTo('Cancel the delete dialog');
$I->click('a span[data-identifier="actions-edit-delete"]', $inlineElmentToDelete);
$I->click('a span[data-identifier="actions-edit-delete"]', $inlineElementToDelete);
$modalDialog->clickButtonInDialog('button[name="no"]');
// switch form Dialogbox back to IFrame
$I->switchToIFrame('list_frame');
$I->seeElement($inlineElmentToDelete);
$I->seeElement($inlineElementToDelete);

$I->wantTo('Accept the delete dialog');
$I->click('a span[data-identifier="actions-edit-delete"]', $inlineElmentToDelete);
$modalDialog->clickButtonInDialog('button[name="yes"]');
$I->click('a span[data-identifier="actions-edit-delete"]', $inlineElementToDelete);

// don't use $modalDialog->clickButtonInDialog due to too low timeout
$modalDialog->canSeeDialog();
$I->click('button[name="yes"]', ModalDialog::$openedModalButtonContainerSelector);
$I->waitForElementNotVisible(ModalDialog::$openedModalSelector, 30);
// switch form Dialogbox back to IFrame
$I->switchToIFrame('list_frame');
$I->waitForElementNotVisible($inlineElmentToDelete);
$I->waitForElementNotVisible($inlineElementToDelete);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ public function canDeleteTask(Admin $I, ModalDialog $modalDialog)
$I->seeElement('//a[contains(@data-original-title, "Delete")]');
$I->click('//a[contains(@data-original-title, "Delete")]');
$I->wantTo('Cancel the delete dialog');
$modalDialog->clickButtonInDialog('Cancel');

// don't use $modalDialog->clickButtonInDialog due to too low timeout
$modalDialog->canSeeDialog();
$I->click('Cancel', ModalDialog::$openedModalButtonContainerSelector);
$I->waitForElementNotVisible(ModalDialog::$openedModalSelector, 30);

$I->switchToIFrame('list_frame');
$I->wantTo('Still see and can click the Delete button as the deletion has been canceled');
$I->click('//a[contains(@data-original-title, "Delete")]');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ public function checkThatAddingABookmarkAddsItemToTheBookmarkList(Admin $I, Moda

$I->click(self::$docHeaderBookmarkButtonSelector);
// cancel the action to test the functionality
$dialog->clickButtonInDialog('Cancel');
// don't use $modalDialog->clickButtonInDialog due to too low timeout
$dialog->canSeeDialog();
$I->click('Cancel', ModalDialog::$openedModalButtonContainerSelector);
$I->waitForElementNotVisible(ModalDialog::$openedModalSelector, 30);

// check if the list is still empty
$this->checkThatBookmarkListIsInitiallyEmpty($I);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function installTypo3OnPgSql(\AcceptanceTester $I)

// Verify default frontend is rendered
$I->amOnPage('/');
$I->waitForText('Let us introduce you to TYPO3');
$I->waitForText('Let us introduce you to TYPO3', 30);
$I->waitForText('Make it your own');

// Verify link
Expand Down

0 comments on commit 35e4d4e

Please sign in to comment.