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:
parent
f6737e43e9
commit
d9e66b2114
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue