[TASK] Fix flaky Acceptance Tests 34/55634/16
authorAnja Leichsenring <anja.leichsenring@typo3.com>
Fri, 9 Feb 2018 19:45:39 +0000 (20:45 +0100)
committerBenni Mack <benni@typo3.org>
Sat, 10 Feb 2018 22:14:40 +0000 (23:14 +0100)
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>
typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/Inline1nCest.php
typo3/sysext/core/Tests/Acceptance/Backend/Scheduler/TasksCest.php
typo3/sysext/core/Tests/Acceptance/Backend/Topbar/BookmarkCest.php
typo3/sysext/core/Tests/AcceptanceInstallPgsql/InstallWithPgsqlCest.php

index d77c9f0..98976cd 100644 (file)
@@ -137,20 +137,24 @@ class Inline1nCest
      */
     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);
     }
 
     /**
index a48c004..a2c5b59 100644 (file)
@@ -112,7 +112,12 @@ class TasksCest
         $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")]');
index 664050c..beabb97 100644 (file)
@@ -77,7 +77,10 @@ class BookmarkCest
 
         $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);
index c5a2ec0..0a3c457 100644 (file)
@@ -69,7 +69,7 @@ class InstallWithPgsqlCest
 
         // 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