Skip to content

Commit 2170027

Browse files
authored
Merge pull request #12649 from nextcloud/make-acceptance-tests-for-comments-more-robust
Make acceptance tests for comments more robust
2 parents db4a6e9 + 6526381 commit 2170027

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tests/acceptance/features/app-comments.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Feature: app-comments
2424
And I open the details view for "Folder"
2525
And I open the "Comments" tab in the details view
2626
And I create a new comment with "Comment in Folder" as message
27+
And I see a comment with "Comment in Folder" as message
2728
And I open the details view for "welcome.txt"
2829
# The "Comments" tab should already be opened
2930
When I create a new comment with "Comment in welcome.txt" as message

tests/acceptance/features/bootstrap/CommentsAppContext.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ public function iCreateANewCommentWithAsMessage($commentText) {
8383
* @Then /^I see that there are no comments$/
8484
*/
8585
public function iSeeThatThereAreNoComments() {
86-
PHPUnit_Framework_Assert::assertTrue(
87-
$this->actor->find(self::emptyContent(), 10)->isVisible());
86+
if (!WaitFor::elementToBeEventuallyShown(
87+
$this->actor,
88+
self::emptyContent(),
89+
$timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
90+
PHPUnit_Framework_Assert::fail("The no comments message is not visible yet after $timeout seconds");
91+
}
8892
}
8993

9094
/**

0 commit comments

Comments
 (0)