Browse Source

Merge pull request #12649 from nextcloud/make-acceptance-tests-for-comments-more-robust

Make acceptance tests for comments more robust
tags/v16.0.0alpha1
Morris Jobke 5 years ago
parent
commit
217002701e
No account linked to committer's email address

+ 1
- 0
tests/acceptance/features/app-comments.feature View File

@@ -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

+ 6
- 2
tests/acceptance/features/bootstrap/CommentsAppContext.php View File

@@ -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");
}
}

/**

Loading…
Cancel
Save