From a0ea1f6ecb5404d6b706b68b070f4e61cdcea5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 10 Apr 2020 15:14:15 +0200 Subject: [PATCH] Simplify CKEditor translatable fields in specs We've simplified the way CKEditor is handled in tests; probably due to that, we don't need this method anymore. --- spec/features/admin/budget_phases_spec.rb | 4 ++-- spec/support/common_actions/verifications.rb | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/spec/features/admin/budget_phases_spec.rb b/spec/features/admin/budget_phases_spec.rb index 6f3f4f7ef..f1c6d33b7 100644 --- a/spec/features/admin/budget_phases_spec.rb +++ b/spec/features/admin/budget_phases_spec.rb @@ -14,8 +14,8 @@ describe "Admin budget phases" do fill_in "start_date", with: Date.current + 1.day fill_in "end_date", with: Date.current + 12.days - fill_in_translatable_ckeditor "summary", :en, with: "New summary of the phase." - fill_in_translatable_ckeditor "description", :en, with: "New description of the phase." + fill_in_ckeditor "Summary", with: "New summary of the phase." + fill_in_ckeditor "Description", with: "New description of the phase." uncheck "budget_phase_enabled" click_button "Save changes" diff --git a/spec/support/common_actions/verifications.rb b/spec/support/common_actions/verifications.rb index 1d402522c..261a4a2d0 100644 --- a/spec/support/common_actions/verifications.rb +++ b/spec/support/common_actions/verifications.rb @@ -44,12 +44,6 @@ module Verifications end end - def fill_in_translatable_ckeditor(field, locale, params = {}) - selector = ".translatable-fields[data-locale='#{locale}'] textarea[id$='_#{field}']" - locator = find(selector, visible: false)[:id] - fill_in_ckeditor(locator, params) - end - # @param [String] locator label text for the textarea or textarea id def fill_in_ckeditor(locator, params = {}) # Find out ckeditor id at runtime using its label