diff --git a/app/views/decidim/admin/users/show.html.erb b/app/views/decidim/admin/users/show.html.erb index 99497eb..7ad2646 100644 --- a/app/views/decidim/admin/users/show.html.erb +++ b/app/views/decidim/admin/users/show.html.erb @@ -87,7 +87,7 @@ <% if space["published"] %> <%= t("assemblies.index.published", scope: "decidim.admin") %> <% else %> - <%= t("assemblies.index.not_published", scope: "decidim.admin") %> + <%= t("assemblies.index.unpublished", scope: "decidim.admin") %> <% end %> <% end %> diff --git a/app/views/decidim/assemblies/admin/assemblies/index.html.erb b/app/views/decidim/assemblies/admin/assemblies/index.html.erb index 09231dc..c56f823 100644 --- a/app/views/decidim/assemblies/admin/assemblies/index.html.erb +++ b/app/views/decidim/assemblies/admin/assemblies/index.html.erb @@ -89,7 +89,7 @@ <% if assembly.published? %> <%= t("assemblies.index.published", scope: "decidim.admin") %> <% else %> - <%= t("assemblies.index.not_published", scope: "decidim.admin") %> + <%= t("assemblies.index.unpublished", scope: "decidim.admin") %> <% end %> diff --git a/app/views/decidim/conferences/admin/conferences/index.html.erb b/app/views/decidim/conferences/admin/conferences/index.html.erb index 711af1e..a67c3b2 100644 --- a/app/views/decidim/conferences/admin/conferences/index.html.erb +++ b/app/views/decidim/conferences/admin/conferences/index.html.erb @@ -50,7 +50,7 @@ <% if conference.published? %> <%= t("conferences.index.published", scope: "decidim.admin") %> <% else %> - <%= t("conferences.index.not_published", scope: "decidim.admin") %> + <%= t("conferences.index.unpublished", scope: "decidim.admin") %> <% end %> diff --git a/spec/features/check_overrides_spec.rb b/spec/features/check_overrides_spec.rb index ab20d68..cd2051d 100644 --- a/spec/features/check_overrides_spec.rb +++ b/spec/features/check_overrides_spec.rb @@ -2,10 +2,5 @@ require "spec_helper" -RSpec.describe "Overrides" do - it "check failing tests in Decidim v0.28" do - # Make test succeed spec/system/department_admin_should_be_able_to_manage_assemblies_spec.rbL73 - # expect(page).to have_current_path decidim_admin_assemblies.assemblies_path(q: { parent_id_eq: parent_assembly&.id }) - expect(Decidim.version).to be < "0.28" - end -end +# RSpec.describe "Overrides" do +# end diff --git a/spec/system/admin_explores_processes_spec.rb b/spec/system/admin_explores_processes_spec.rb index dab7a8b..9a63ad4 100644 --- a/spec/system/admin_explores_processes_spec.rb +++ b/spec/system/admin_explores_processes_spec.rb @@ -40,13 +40,13 @@ end def check_column_header_exists(position: 1, content: "") - within "#processes .card-section .table-scroll table thead th:nth-child(#{position})" do + within "#processes .table-scroll table thead th:nth-child(#{position})" do expect(page).to have_content(content) end end def check_column_data_exists(position: 1, content: "") - within "#processes .card-section .table-scroll table tbody td:nth-child(#{position})" do + within "#processes .table-scroll table tbody td:nth-child(#{position})" do expect(page).to have_content(content) end end diff --git a/spec/system/department_admin_manages_newsletters_spec.rb b/spec/system/department_admin_manages_newsletters_spec.rb index 2399cfa..3ca7373 100644 --- a/spec/system/department_admin_manages_newsletters_spec.rb +++ b/spec/system/department_admin_manages_newsletters_spec.rb @@ -21,9 +21,27 @@ def fill_newsletter_form fill_in_i18n( :newsletter_subject, "#newsletter-subject-tabs", - en: "A fancy newsletter for %{name}", - es: "Un correo electrónico muy chulo para %{name}", - ca: "Un correu electrònic flipant per a %{name}" + **attributes[:subject].except("machine_translations") + ) + + fill_in_i18n_editor( + :newsletter_settings_introduction, + "#newsletter-settings--introduction-tabs", + en: "Hello %{name}! Relevant content.", + es: "Hola, %{name}! Contenido relevante.", + ca: "Hola, %{name}! Contingut rellevant." + ) + + fill_in_i18n( + :newsletter_settings_cta_text, + "#newsletter-settings--cta_text-tabs", + en: "Hello %{name}! Relevant content." + ) + + fill_in_i18n( + :newsletter_settings_cta_url, + "#newsletter-settings--cta_url-tabs", + en: "Hello %{name}! Relevant content." ) fill_in_i18n_editor( @@ -33,26 +51,26 @@ def fill_newsletter_form es: "Hola, %{name}! Contenido relevante.", ca: "Hola, %{name}! Contingut rellevant." ) - - find("*[type=submit]").click end context "when creating and previewing a newsletter" do it "allows a newsletter to be created" do visit decidim_admin.newsletters_path - within ".secondary-nav" do - find(".button.new").click - end + find(".button.new").click - within "#basic_only_text .card-footer" do - click_link_or_button("Use this template") + within "#image_text_cta" do + click_link_or_button "Use this template" end - within "#new_newsletter_" do + within ".new_newsletter" do fill_newsletter_form end + within ".new_newsletter" do + find("*[type=submit]").click + end + expect(page).to have_content("Preview") expect(page).to have_content("A fancy newsletter for #{department_admin.name}") end @@ -126,8 +144,8 @@ def fill_newsletter_form end end - within ".button--double" do - accept_confirm { find("*", text: "Deliver").click } + within "form.newsletter_deliver .item__edit-sticky" do + accept_confirm { click_on("Deliver newsletter") } end wait_redirect @@ -162,8 +180,8 @@ def fill_newsletter_form end end - within ".button--double" do - accept_confirm { find("*", text: "Deliver").click } + within "form.newsletter_deliver .item__edit-sticky" do + accept_confirm { click_on("Deliver newsletter") } end wait_redirect @@ -204,8 +222,8 @@ def fill_newsletter_form end end - within ".button--double" do - accept_confirm { find("*", text: "Deliver").click } + within "form.newsletter_deliver .item__edit-sticky" do + accept_confirm { click_on("Deliver newsletter") } end wait_redirect diff --git a/spec/system/department_admin_should_be_able_to_access_admin_dashboard_spec.rb b/spec/system/department_admin_should_be_able_to_access_admin_dashboard_spec.rb index 393ed9a..79e6726 100644 --- a/spec/system/department_admin_should_be_able_to_access_admin_dashboard_spec.rb +++ b/spec/system/department_admin_should_be_able_to_access_admin_dashboard_spec.rb @@ -16,7 +16,6 @@ it "is able to access the admin Dashboard" do expect(page).to have_content("Dashboard") - expect(page).to have_content("Welcome to the Admin Panel.") end context "when accessing the dashboard some left menu elements should be accessible" do @@ -24,7 +23,7 @@ expect(page).to have_content("Processes") click_link_or_button "Processes" expect(page).to have_current_path "/admin/participatory_processes" - expect(page).to have_content("Participatory processes") + expect(page).to have_content("New process") end it "is able to access 'Assemblies'" do @@ -52,7 +51,7 @@ expect(page).to have_content("Conferences") click_link_or_button "Conferences" expect(page).to have_current_path "/admin/conferences" - expect(page).to have_content("New Conference") + expect(page).to have_content("New conference") end # TODO: not supported at the moment # it "should be able to access 'Initiatives'" diff --git a/spec/system/department_admin_should_be_able_to_manage_processes_spec.rb b/spec/system/department_admin_should_be_able_to_manage_processes_spec.rb index 4223b7b..8c823c4 100644 --- a/spec/system/department_admin_should_be_able_to_manage_processes_spec.rb +++ b/spec/system/department_admin_should_be_able_to_manage_processes_spec.rb @@ -37,7 +37,7 @@ let(:image2_path) { Decidim::Dev.asset(image2_filename) } before do - click_link_or_button_or_button "New process" + click_link_or_button "New process" end it "creates a new participatory process with department admin's area" do