From 41274ecc4fbba6646d70ee4fda02cded8317c7bc Mon Sep 17 00:00:00 2001 From: Anna Topalidi Date: Wed, 27 Mar 2024 16:49:20 +0100 Subject: [PATCH] fix tests, fix form: Actions -> publish answer --- .../bulk_actions/_publish_answers.html.erb | 6 ++-- .../user_interacts_with_pdf_viewer_spec.rb | 28 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/views/decidim/participatory_documents/admin/suggestions/bulk_actions/_publish_answers.html.erb b/app/views/decidim/participatory_documents/admin/suggestions/bulk_actions/_publish_answers.html.erb index 03c178f2..cb1fed5b 100644 --- a/app/views/decidim/participatory_documents/admin/suggestions/bulk_actions/_publish_answers.html.erb +++ b/app/views/decidim/participatory_documents/admin/suggestions/bulk_actions/_publish_answers.html.erb @@ -1,5 +1,5 @@
- <%= form_tag(publish_answers_document_suggestions_path(document), method: :post, remote: true, id: "js-form-publish-answers", class: "flex--cc flex-gap--1") do %> + <%= form_tag(publish_answers_document_suggestions_path(document), method: :post, remote: true, id: "js-form-publish-answers", class: "form form-defaults flex items-center gap-x-2") do %>
<% suggestions.each do |suggestion| %> <%= check_box_tag "suggestion_ids[]", suggestion.id, false, class: "js-check-all-suggestion js-suggestion-id-#{suggestion.id}" %> @@ -7,8 +7,8 @@

<%= t("decidim.participatory_documents.admin.suggestions.publish_answers.number_of_suggestions", number: '').html_safe %>

- <%= submit_tag(t("decidim.participatory_documents.admin.suggestions.index.actions.publish"), id: "js-submit-publish-answers", class: "button small button--simple float-left") %> + <%= submit_tag(t("decidim.participatory_documents.admin.suggestions.index.actions.publish"), id: "js-submit-publish-answers", class: "button button__sm button__secondary small button--simple float-left") %> - + <% end %>
diff --git a/spec/system/user_interacts_with_pdf_viewer_spec.rb b/spec/system/user_interacts_with_pdf_viewer_spec.rb index 81d9255c..2d27a3b6 100644 --- a/spec/system/user_interacts_with_pdf_viewer_spec.rb +++ b/spec/system/user_interacts_with_pdf_viewer_spec.rb @@ -12,7 +12,7 @@ shared_examples "interacts with drawer" do it "displays the drawer" do - expect(page).to have_css("#participation-modal") + expect(page).to have_css("#participationModal") expect(page).to have_css("#participation-modal-form") expect(page).to have_css("#suggestions-list") end @@ -25,7 +25,7 @@ let(:attributes) { { suggestable: sugested, author: user, answer:, answered_at: Time.zone.now, answer_is_published: published } } it "displays only my suggestion" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_content(my_suggestion.body["en"]) expect(page).to have_no_content(other_suggestion.body["en"]) end @@ -40,7 +40,7 @@ context "when the answer is draft" do it "does not render admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_no_content(answer["en"]) end end @@ -50,7 +50,7 @@ let(:published) { true } it "does not render admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_no_content(answer["en"]) end end @@ -62,7 +62,7 @@ context "when the answer is draft" do it "does not render admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_no_content(answer["en"]) end end @@ -72,7 +72,7 @@ let(:published) { true } it "renders admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_content(answer["en"]) end end @@ -84,7 +84,7 @@ context "when the answer is draft" do it "does not render admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_no_content(answer["en"]) end end @@ -94,7 +94,7 @@ let(:published) { true } it "renders admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_no_content(answer["en"]) end end @@ -106,7 +106,7 @@ context "when the answer is draft" do it "does not render admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_no_content(answer["en"]) end end @@ -116,7 +116,7 @@ let(:published) { true } it "renders admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_content(answer["en"]) end end @@ -128,7 +128,7 @@ context "when the answer is draft" do it "does not render admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_no_content(answer["en"]) end end @@ -138,7 +138,7 @@ let(:published) { true } it "renders admin note" do - within "#participation-modal" do + within "#participationModal" do expect(page).to have_content(answer["en"]) end end @@ -194,7 +194,7 @@ it "submits a box content" do find("#box-#{section.annotations.first.id}").click sleep 1 - expect(page).to have_css("#participation-modal.active") + expect(page).to have_css("#participationModal.active") expect(page).to have_no_content("upload a file") expect(page).to have_content(t("activemodel.attributes.suggestion.body")) @@ -213,7 +213,7 @@ it "submits a global content" do click_link_or_button "Global suggestions" sleep 1 - expect(page).to have_css("#participation-modal.active") + expect(page).to have_css("#participationModal.active") expect(page).to have_content("upload a file") expect(page).to have_content(t("activemodel.attributes.suggestion.body"))