From c9b47d92e07f779a484e84a5d50671ed1edfa383 Mon Sep 17 00:00:00 2001
From: Sascha Egerer <sascha@sascha-egerer.de>
Date: Tue, 19 Apr 2016 18:14:42 +0200
Subject: [PATCH] [BUGFIX] Make Topbar bookmark acceptance test more stable

Change-Id: I2260589acacab49d7120b515ba27870fee79eca7
Resolves: #75791
Releases: master
Reviewed-on: https://review.typo3.org/47794
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 .../Acceptance/Backend/Topbar/BookmarkCest.php     | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/typo3/sysext/core/Tests/Acceptance/Backend/Topbar/BookmarkCest.php b/typo3/sysext/core/Tests/Acceptance/Backend/Topbar/BookmarkCest.php
index 34fb0c9958ad..16415c43273d 100644
--- a/typo3/sysext/core/Tests/Acceptance/Backend/Topbar/BookmarkCest.php
+++ b/typo3/sysext/core/Tests/Acceptance/Backend/Topbar/BookmarkCest.php
@@ -66,7 +66,7 @@ class BookmarkCest
      * @param ModalDialog $dialog
      * @return Admin
      */
-    public function checkThatAddingABookmarkAddAItemToTheBookmarkList(Admin $I, ModalDialog $dialog, Scenario $scenario)
+    public function checkThatAddingABookmarkAddsItemToTheBookmarkList(Admin $I, ModalDialog $dialog, Scenario $scenario)
     {
         $I->switchToIFrame();
         // open the scheduler module as we would like to put it into the bookmark liste
@@ -87,11 +87,11 @@ class BookmarkCest
         $dialog->clickButtonInDialog('OK');
 
         $this->clickBookmarkDropdownToggleInTopbar($I);
-        $I->canSee('Scheduled tasks', self::$topBarModuleSelector . ' ' . Topbar::$dropdownContainerSelector);
+        $I->waitForText('Scheduled tasks', 15, self::$topBarModuleSelector . ' ' . Topbar::$dropdownContainerSelector);
 
-        // @test complese test when https://forge.typo3.org/issues/75689 is fixed
+        // @test complete test when https://forge.typo3.org/issues/75689 is fixed
         $scenario->comment(
-            'Test for deleting the item in the list and readd it are missing ' .
+            'Tests for deleting the item in the list and readding it are missing ' .
             'as this is currently broken in the core. See https://forge.typo3.org/issues/75689'
         );
 
@@ -100,7 +100,7 @@ class BookmarkCest
 
     /**
      * @param Admin $I
-     * @depends checkThatAddingABookmarkAddAItemToTheBookmarkList
+     * @depends checkThatAddingABookmarkAddsItemToTheBookmarkList
      */
     public function checkIfBookmarkItemLinksToTarget(Admin $I)
     {
@@ -112,7 +112,7 @@ class BookmarkCest
 
     /**
      * @param Admin $I
-     * @depends checkThatAddingABookmarkAddAItemToTheBookmarkList
+     * @depends checkThatAddingABookmarkAddsItemToTheBookmarkList
      */
     public function checkIfEditBookmarkItemWorks(Admin $I)
     {
@@ -131,7 +131,7 @@ class BookmarkCest
 
     /**
      * @param Admin $I
-     * @depends checkThatAddingABookmarkAddAItemToTheBookmarkList
+     * @depends checkThatAddingABookmarkAddsItemToTheBookmarkList
      */
     public function checkIfDeleteBookmarkWorks(Admin $I, ModalDialog $dialog)
     {
-- 
GitLab