diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2018-11-27 21:25:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 21:25:10 +0100 |
commit | b8311b0dd59ab2ce4dd759d4df10afc4a9e9d485 (patch) | |
tree | b405c055c2aaecae87b7e8fe08f771235953db42 | |
parent | 2706bc7df7801e1ad4fed82922387d11e4726233 (diff) | |
parent | 876ee0fd76b6c464740379cc8fb8d5001e8628c7 (diff) | |
download | nextcloud-server-b8311b0dd59ab2ce4dd759d4df10afc4a9e9d485.tar.gz nextcloud-server-b8311b0dd59ab2ce4dd759d4df10afc4a9e9d485.zip |
Merge pull request #12697 from nextcloud/backport/12649/stable14
[stable14] Make acceptance tests for comments more robust
-rw-r--r-- | tests/acceptance/features/app-comments.feature | 1 | ||||
-rw-r--r-- | tests/acceptance/features/bootstrap/CommentsAppContext.php | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/acceptance/features/app-comments.feature b/tests/acceptance/features/app-comments.feature index 1ee113d0aac..42893e5ea35 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 5d19412c30e..57e60afa60e 100644 --- a/tests/acceptance/features/bootstrap/CommentsAppContext.php +++ b/tests/acceptance/features/bootstrap/CommentsAppContext.php @@ -83,8 +83,12 @@ class CommentsAppContext implements Context, ActorAwareInterface { * @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"); + } } /** |