diff --git a/features/forum.feature b/features/forum.feature index bfcd185..0239c65 100644 --- a/features/forum.feature +++ b/features/forum.feature @@ -79,7 +79,7 @@ Feature: forum | joaosilva | Forum One | And I go to /joaosilva/forum-one When I follow "Configure forum" - And I fill in "Description" with "My description" + And I fill in tinyMCE "article_body" with "My description" And I check "Has terms of use:" And I press "Save" Then I should see "Forum One" @@ -95,7 +95,7 @@ Feature: forum | mariasilva | Maria Silva | And I go to /joaosilva/forum-one When I follow "Configure forum" - And I fill in "Description" with "My description" + And I fill in tinyMCE "article_body" with "My description" And I check "Has terms of use:" And I press "Save" When I follow "New discussion topic" @@ -118,7 +118,7 @@ Feature: forum | mariasilva | Maria Silva | And I go to /joaosilva/forum-one When I follow "Configure forum" - And I fill in "Description" with "My description" + And I fill in tinyMCE "article_body" with "My description" And I check "Has terms of use:" And I press "Save" When I follow "Logout" @@ -135,7 +135,7 @@ Feature: forum | joaosilva | Forum One | And I go to /joaosilva/forum-one When I follow "Configure forum" - And I fill in "Description" with "My description" + And I fill in tinyMCE "article_body" with "My description" And I check "Has terms of use:" And I press "Save" When I follow "Logout" diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 031c649..af97759 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -276,6 +276,10 @@ Then /^display "([^\"]*)"$/ do |element| evaluate_script("jQuery('#{element}').show() && false;") end +Then /^I fill in tinyMCE "(.*?)" with "(.*?)"$/ do |field, content| + execute_script("$(tinymce.editors['#{field}'].setContent('#{content}'))") +end + Then /^there should be a div with class "([^"]*)"$/ do |klass| should have_selector("div.#{klass}") end -- libgit2 0.21.2