Merge pull request #12649 from nextcloud/make-acceptance-tests-for-comments-more-robust
Make acceptance tests for comments more robust
This commit is contained in:
commit
217002701e
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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…
Reference in a new issue