summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2018-11-27 22:00:21 +0100
committerGitHub <noreply@github.com>2018-11-27 22:00:21 +0100
commit5ea9932b59ef90a74430a846bf8bd1a70dfd69b5 (patch)
tree076f10b23f789ad8384ced64aab88d82a2d1ef91
parentb7e195dd7f265ceb769c4b5a8f0eb5434c69ddd3 (diff)
parentad0adaea95637e1d8fdfe3d2611170562639b68d (diff)
downloadnextcloud-server-5ea9932b59ef90a74430a846bf8bd1a70dfd69b5.tar.gz
nextcloud-server-5ea9932b59ef90a74430a846bf8bd1a70dfd69b5.zip
Merge pull request #12696 from nextcloud/backport/12649/stable15
[stable15] Make acceptance tests for comments more robust
-rw-r--r--tests/acceptance/features/app-comments.feature1
-rw-r--r--tests/acceptance/features/bootstrap/CommentsAppContext.php8
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");
+ }
}
/**