From 6f978b9f4ed253d28de59114e43c18516c26fd77 Mon Sep 17 00:00:00 2001 From: voodoorai2000 Date: Tue, 9 Oct 2018 18:32:59 +0200 Subject: [PATCH] Fix portuguese specs --- .../site_customization/custom_pages_spec.rb | 20 +++++++++---------- .../poll_question_answers_spec.rb | 4 ++-- spec/shared/features/translatable.rb | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/spec/features/site_customization/custom_pages_spec.rb b/spec/features/site_customization/custom_pages_spec.rb index 74148b577..d9bf01acb 100644 --- a/spec/features/site_customization/custom_pages_spec.rb +++ b/spec/features/site_customization/custom_pages_spec.rb @@ -107,7 +107,7 @@ feature "Custom Pages" do scenario "Listed in more information page" do custom_page = create(:site_customization_page, :published, - slug: "another-slug", + slug: "another-slug", title_en: "Another custom page", subtitle_en: "Subtitle for custom page", more_info_flag: true @@ -136,10 +136,10 @@ feature "Custom Pages" do expect(page).to have_content("Subtitle for custom page") end end - end - + end + context "Translation" do - + let(:custom_page) { create(:site_customization_page, :published, slug: "example-page", title_en: "Title in English", @@ -148,7 +148,7 @@ feature "Custom Pages" do subtitle_es: "Subtitulo en Español", content_en: "Content in English", content_es: "Contenido en Español" - ) } + ) } background do admin = create(:administrator) @@ -162,19 +162,19 @@ feature "Custom Pages" do scenario "Add a translation in Português", :js do visit @edit_page_url - select "Português", from: "translation_locale" + select "Português brasileiro", from: "translation_locale" fill_in 'site_customization_page_title_pt_br', with: 'Titulo em Português' click_button 'Update Custom page' expect(page).to have_content "Page updated successfully" - + visit @edit_page_url expect(page).to have_field('site_customization_page_title_en', with: 'Title in English') click_link "Español" expect(page).to have_field('site_customization_page_title_es', with: 'Titulo en Español') - click_link "Português" + click_link "Português brasileiro" expect(page).to have_field('site_customization_page_title_pt_br', with: 'Titulo em Português') end @@ -190,11 +190,11 @@ feature "Custom Pages" do visit custom_page.url select('English', from: 'locale-switcher') - + expect(page).to have_content("Title in English") select('Español', from: 'locale-switcher') - + expect(page).to have_content("Titulo correcta en Español") end diff --git a/spec/features/translations/poll_question_answers_spec.rb b/spec/features/translations/poll_question_answers_spec.rb index cd33106c1..fded75cfd 100644 --- a/spec/features/translations/poll_question_answers_spec.rb +++ b/spec/features/translations/poll_question_answers_spec.rb @@ -91,11 +91,11 @@ feature "Translations" do scenario "Add a translation for a locale with non-underscored name", :js do visit @edit_answer_url - select('Português', from: 'translation_locale') + select('Português brasileiro', from: 'translation_locale') fill_in_ckeditor 'poll_question_answer_description_pt_br', with: 'resposta em Português' click_button 'Save' - select('Português', from: 'locale-switcher') + select('Português brasileiro', from: 'locale-switcher') expect(page).to have_content("resposta em Português") end diff --git a/spec/shared/features/translatable.rb b/spec/shared/features/translatable.rb index 843df2c09..e3abf5f84 100644 --- a/spec/shared/features/translatable.rb +++ b/spec/shared/features/translatable.rb @@ -107,14 +107,14 @@ shared_examples "translatable" do |factory_name, path_name, fields| visit path field = fields.sample - select "Português", from: "translation_locale" + select "Português brasileiro", from: "translation_locale" fill_in field_for(field, :pt_br), with: text_for(field, :"pt-BR") click_button update_button_text visit path - select('Português', from: 'locale-switcher') + select('Português brasileiro', from: 'locale-switcher') expect(page).to have_field(field_for(field, :pt_br), with: text_for(field, :"pt-BR")) end