diff --git a/tests/acceptance/features/app-comments.feature b/tests/acceptance/features/app-comments.feature index 1ee113d0aac57..42893e5ea3533 100644 --- a/tests/acceptance/features/app-comments.feature +++ b/tests/acceptance/features/app-comments.feature @@ -24,6 +24,7 @@ Feature: app-comments And I open the details view for "Folder" And I open the "Comments" tab in the details view And I create a new comment with "Comment in Folder" as message + And I see a comment with "Comment in Folder" as message And I open the details view for "welcome.txt" # The "Comments" tab should already be opened When I create a new comment with "Comment in welcome.txt" as message diff --git a/tests/acceptance/features/bootstrap/CommentsAppContext.php b/tests/acceptance/features/bootstrap/CommentsAppContext.php index 5d19412c30e26..57e60afa60eb1 100644 --- a/tests/acceptance/features/bootstrap/CommentsAppContext.php +++ b/tests/acceptance/features/bootstrap/CommentsAppContext.php @@ -83,8 +83,12 @@ public function iCreateANewCommentWithAsMessage($commentText) { * @Then /^I see that there are no comments$/ */ public function iSeeThatThereAreNoComments() { - PHPUnit_Framework_Assert::assertTrue( - $this->actor->find(self::emptyContent(), 10)->isVisible()); + if (!WaitFor::elementToBeEventuallyShown( + $this->actor, + self::emptyContent(), + $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) { + PHPUnit_Framework_Assert::fail("The no comments message is not visible yet after $timeout seconds"); + } } /**