Commit 51baa75aa972a2c63541bf66f88488d27f0f5586

Authored by Rodrigo Souto
1 parent 1c11a51e

tiny-mce-feature: fix selenium tests

features/step_definitions/tiny_mce_steps.rb
... ... @@ -5,5 +5,5 @@ end
5 5  
6 6 Then /^The tinymce "(.+)" should contain "(.+)"$/ do |item, content|
7 7 item_value = page.evaluate_script("tinyMCE.activeEditor.getParam('#{item}');")
8   - assert_include item_value.to_s, content
  8 + expect(item_value.to_s).to have_content(content)
9 9 end
... ...
features/tiny_mce.feature
... ... @@ -10,10 +10,7 @@ Feature: Create tinyMCE article
10 10  
11 11 @selenium
12 12 Scenario: mce complete mode should show on message creation
13   - Given I am on joaosilva's control panel
14   - And I follow "Manage Content"
15   - And I follow "New content"
16   - And I follow "Text article with visual editor"
  13 + Given I am on /myprofile/joaosilva/cms/new?type=TinyMceArticle
17 14 Then The tinymce "toolbar1" should be "fullscreen | insertfile undo redo | copy paste | bold italic underline | styleselect fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
18 15 And The tinymce "menubar" should be "edit insert view tools"
19 16 And The tinymce "toolbar2" should contain "print preview code media | table"
... ...