Adjust timeouts in the step to create a new comment

Depending on the previous steps the new comment field may be already
shown or not when the step to create a new comment is executed.
Therefore, the timeout was increased from 2 to the "standard" 10 seconds
used in other tests.

If the new comment field was found there is no need to use a timeout
when looking for the new comment button; it is either there or not, it
will not appear after some time.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2018-02-15 16:55:42 +01:00
parent 28d5862643
commit 0a2c98ac89
1 changed files with 2 additions and 2 deletions

View File

@ -57,8 +57,8 @@ class CommentsAppContext implements Context, ActorAwareInterface {
* @When /^I create a new comment with "([^"]*)" as message$/
*/
public function iCreateANewCommentWithAsMessage($commentText) {
$this->actor->find(self::newCommentField(), 2)->setValue($commentText);
$this->actor->find(self::submitNewCommentButton(), 2)->click();
$this->actor->find(self::newCommentField(), 10)->setValue($commentText);
$this->actor->find(self::submitNewCommentButton())->click();
}
/**