diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-11-26 11:23:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-26 11:23:01 +0100 |
commit | 217002701e1e56c97acc1f1bbc93361b5b27d081 (patch) | |
tree | 76acaba7142e6a594c8dab47082e47d090f10d2b /tests | |
parent | db4a6e947bbec753f02d07022a16df28ebdf54ad (diff) | |
parent | 65263817d0208bdf5f7d9a2c1ef43512ccfbdd4b (diff) | |
download | nextcloud-server-217002701e1e56c97acc1f1bbc93361b5b27d081.tar.gz nextcloud-server-217002701e1e56c97acc1f1bbc93361b5b27d081.zip |
Merge pull request #12649 from nextcloud/make-acceptance-tests-for-comments-more-robust
Make acceptance tests for comments more robust
Diffstat (limited to 'tests')
-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"); + } } /** |