From 51baa75aa972a2c63541bf66f88488d27f0f5586 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Thu, 21 Jan 2016 18:07:19 -0300 Subject: [PATCH] tiny-mce-feature: fix selenium tests --- features/step_definitions/tiny_mce_steps.rb | 2 +- features/tiny_mce.feature | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/features/step_definitions/tiny_mce_steps.rb b/features/step_definitions/tiny_mce_steps.rb index bbf9c07..12452ed 100644 --- a/features/step_definitions/tiny_mce_steps.rb +++ b/features/step_definitions/tiny_mce_steps.rb @@ -5,5 +5,5 @@ end Then /^The tinymce "(.+)" should contain "(.+)"$/ do |item, content| item_value = page.evaluate_script("tinyMCE.activeEditor.getParam('#{item}');") - assert_include item_value.to_s, content + expect(item_value.to_s).to have_content(content) end diff --git a/features/tiny_mce.feature b/features/tiny_mce.feature index e114987..e4320b4 100644 --- a/features/tiny_mce.feature +++ b/features/tiny_mce.feature @@ -10,10 +10,7 @@ Feature: Create tinyMCE article @selenium Scenario: mce complete mode should show on message creation - Given I am on joaosilva's control panel - And I follow "Manage Content" - And I follow "New content" - And I follow "Text article with visual editor" + Given I am on /myprofile/joaosilva/cms/new?type=TinyMceArticle 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" And The tinymce "menubar" should be "edit insert view tools" And The tinymce "toolbar2" should contain "print preview code media | table" -- libgit2 0.21.2