diff --git a/tests/behat/features/bootstrap/FeatureContext.php b/tests/behat/features/bootstrap/FeatureContext.php index b01cef1bbf..c98f9b3a70 100644 --- a/tests/behat/features/bootstrap/FeatureContext.php +++ b/tests/behat/features/bootstrap/FeatureContext.php @@ -281,6 +281,9 @@ class FeatureContext extends MinkContext */ public function iFillInWysiwygOnFieldWith($locator, $value) { + // Just in case wait that ckeditor is loaded + $this->getSession()->wait(2000); + $el = $this->getSession()->getPage()->findField($locator); $fieldId = $el->getAttribute('id'); diff --git a/tests/behat/features/toolForum.feature b/tests/behat/features/toolForum.feature index 35ca86af58..2d5c1f3812 100644 --- a/tests/behat/features/toolForum.feature +++ b/tests/behat/features/toolForum.feature @@ -17,7 +17,7 @@ Feature: Forum tool Scenario: Create a forum Given I am on "/main/forum/index.php?action=add&content=forum&cidReq=TEMP" When I fill in the following: - | forum_title | Forum Test | + | forum_title | Forum Test | And I fill in ckeditor field "forum_comment" with "This is the first forum for test" And I press "SubmitForum" Then I should see "The forum has been added" @@ -26,8 +26,9 @@ Feature: Forum tool Given I am on "/main/forum/index.php?cidReq=TEMP" And I follow "Forum Test" And I follow "Create thread" + And wait for the page to be loaded When I fill in the following: - | post_title | Thread One | + | post_title | Thread One | And I fill in ckeditor field "post_text" with "This is a the first thread in a forum for test" And I press "SubmitPost" Then I should see "The new thread has been added"