Wait for ckeditor to load

pull/2487/head
jmontoyaa 9 years ago
parent 1d1833cdc6
commit ad5b2d24d3
  1. 3
      tests/behat/features/bootstrap/FeatureContext.php
  2. 5
      tests/behat/features/toolForum.feature

@ -281,6 +281,9 @@ class FeatureContext extends MinkContext
*/ */
public function iFillInWysiwygOnFieldWith($locator, $value) public function iFillInWysiwygOnFieldWith($locator, $value)
{ {
// Just in case wait that ckeditor is loaded
$this->getSession()->wait(2000);
$el = $this->getSession()->getPage()->findField($locator); $el = $this->getSession()->getPage()->findField($locator);
$fieldId = $el->getAttribute('id'); $fieldId = $el->getAttribute('id');

@ -17,7 +17,7 @@ Feature: Forum tool
Scenario: Create a forum Scenario: Create a forum
Given I am on "/main/forum/index.php?action=add&content=forum&cidReq=TEMP" Given I am on "/main/forum/index.php?action=add&content=forum&cidReq=TEMP"
When I fill in the following: 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 fill in ckeditor field "forum_comment" with "This is the first forum for test"
And I press "SubmitForum" And I press "SubmitForum"
Then I should see "The forum has been added" 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" Given I am on "/main/forum/index.php?cidReq=TEMP"
And I follow "Forum Test" And I follow "Forum Test"
And I follow "Create thread" And I follow "Create thread"
And wait for the page to be loaded
When I fill in the following: 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 fill in ckeditor field "post_text" with "This is a the first thread in a forum for test"
And I press "SubmitPost" And I press "SubmitPost"
Then I should see "The new thread has been added" Then I should see "The new thread has been added"

Loading…
Cancel
Save