From 45329ede9f59945d9fc8c322c15dad6450e4b29a Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 31 May 2019 11:40:23 +0200 Subject: [PATCH 1/7] Rename legislation setting to collaborative legislation --- config/locales/en/settings.yml | 2 +- config/locales/es/settings.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/en/settings.yml b/config/locales/en/settings.yml index 0351ac7b63e..5ec894b18e4 100644 --- a/config/locales/en/settings.yml +++ b/config/locales/en/settings.yml @@ -137,7 +137,7 @@ en: polls_description: "Citizens' polls are a participatory mechanism by which citizens with voting rights can make direct decisions" budgets: "Participatory budgeting" budgets_description: "With participatory budgets, citizens decide which projects presented by their neighbours will receive a part of the budget" - legislation: "Legislation" + legislation: "Collaborative Legislation" legislation_description: "In participatory processes, citizens are offered the opportunity to participate in the drafting and modification of regulations that affect the society and to give their opinion on certain actions that are planned to be carried out" html: per_page_code_head: "Code to be included on every page ()" diff --git a/config/locales/es/settings.yml b/config/locales/es/settings.yml index 4df2820d626..e5b260f299f 100644 --- a/config/locales/es/settings.yml +++ b/config/locales/es/settings.yml @@ -137,7 +137,7 @@ es: polls_description: "Las votaciones ciudadanas son un mecanismo de participación por el que la ciudadanía con derecho a voto puede tomar decisiones de forma directa" budgets: "Presupuestos participativos" budgets_description: "Con los presupuestos participativos la ciudadanía decide a qué proyectos presentados por los vecinos y vecinas va destinada una parte del presupuesto" - legislation: "Legislación" + legislation: "Legislación colaborativa" legislation_description: "En los procesos participativos se ofrece a la ciudadanía la oportunidad de participar en la elaboración y modificación de normativa que afecta a la sociedad y de dar su opinión sobre ciertas actuaciones que se tiene previsto llevar a cabo" html: per_page_code_head: "Código a incluir en cada página ()" From b810d6b6b9353acf7ca0c01d75913b16ac9b12ba Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 27 May 2019 13:28:08 +0200 Subject: [PATCH 2/7] Add help text to email and poster proposals settings --- config/locales/en/settings.yml | 4 ++-- config/locales/es/settings.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/en/settings.yml b/config/locales/en/settings.yml index 5ec894b18e4..f55030b2fdd 100644 --- a/config/locales/en/settings.yml +++ b/config/locales/en/settings.yml @@ -70,11 +70,11 @@ en: poll_link: Additional information link poll_link_description: Añade un enlace de información adicional a la funcionalidad de encuestas del panel de control email_short_title: Email - email_short_title_description: Short description of the email feature. Allows users to send an email to promote their proposal + email_short_title_description: 'Short description of the email feature. Allows users to send an email to promote their proposal. You can find all the content of this email in "/app/views/dashboard/mailer/forward.html.erb"' email_description: Email description email_description_description: Detailed description of the email feature poster_short_title: Poster - poster_short_title_description: Short description of the poster feature. Allows users to download a poster on PDF format to promote their proposal + poster_short_title_description: 'Short description of the poster feature. Allows users to download a poster on PDF format to promote their proposal. You can find all the content of this poster in "/app/views/dashboard/poster/index.pdf.erb"' poster_description: Poster description poster_description_description: Detailed description of the poster feature analytics_url: "Analytics URL" diff --git a/config/locales/es/settings.yml b/config/locales/es/settings.yml index e5b260f299f..fcda0491f16 100644 --- a/config/locales/es/settings.yml +++ b/config/locales/es/settings.yml @@ -75,11 +75,11 @@ es: poll_link: Enlace de información adicional poll_link_description: Añade un enlace de información adicional a la funcionalidad de encuestas del panel de control email_short_title: Correo electrónico - email_short_title_description: Breve descripción de la funcionalidad de correo electrónico. Permite a los usuarios enviar un email para difundir su propuesta + email_short_title_description: 'Breve descripción de la funcionalidad de correo electrónico. Permite a los usuarios enviar un email para difundir su propuesta. Puedes encontrar todo el contenido de este correo electrónico en "/app/views/dashboard/mailer/forward.html.erb"' email_description: Descripción correo electrónico email_description_description: Descripción detallada de la funcionalidad de correo electrónico poster_short_title: Póster - poster_short_title_description: Breve descripción de la funcionalidad de póster. Permite a los usuarios descargar un póster en formato PDF para difundir su propuesta + poster_short_title_description: 'Breve descripción de la funcionalidad de póster. Permite a los usuarios descargar un póster en formato PDF para difundir su propuesta. Puedes encontrar todo el contenido de este póster en "/app/views/dashboard/poster/index.pdf.erb"' poster_description: Descripción póster poster_description_description: Descripción detallada de la funcionalidad de póster feature: From 5fd493cd2cc319aca12e41195528cfc427e4e277 Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 30 May 2019 00:31:49 +0200 Subject: [PATCH 3/7] Add link to process on legislation processes proposals --- app/assets/stylesheets/legislation.scss | 2 +- .../stylesheets/legislation_process.scss | 26 ++++++++++++++++++- app/views/legislation/proposals/show.html.erb | 11 ++++++++ config/locales/en/legislation.yml | 1 + config/locales/es/legislation.yml | 1 + spec/features/legislation/proposals_spec.rb | 11 ++++++++ 6 files changed, 50 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/legislation.scss b/app/assets/stylesheets/legislation.scss index 6247b64b9b7..b707837890a 100644 --- a/app/assets/stylesheets/legislation.scss +++ b/app/assets/stylesheets/legislation.scss @@ -83,7 +83,7 @@ } .legislation-calendar { - background: #e5ecf2; + background: $highlight; padding-top: 1rem; h4 { diff --git a/app/assets/stylesheets/legislation_process.scss b/app/assets/stylesheets/legislation_process.scss index 474d80bbbb1..cb44880042c 100644 --- a/app/assets/stylesheets/legislation_process.scss +++ b/app/assets/stylesheets/legislation_process.scss @@ -212,7 +212,7 @@ } .quiz-title { - background: #e5ecf2; + background: $highlight; .quiz-header-title { font-size: $small-font-size; @@ -982,3 +982,27 @@ margin-top: 0; } } + +.process-proposal { + margin-bottom: $line-height; + + .header { + background: $highlight; + padding: $line-height; + + @include breakpoint(medium) { + height: $line-height * 4; + } + } + + .process-title { + font-size: $small-font-size; + margin-bottom: 0; + text-transform: uppercase; + } + + .process-link { + font-size: rem-calc(19); + font-weight: bold; + } +} diff --git a/app/views/legislation/proposals/show.html.erb b/app/views/legislation/proposals/show.html.erb index e8e213b0613..55b01499a72 100644 --- a/app/views/legislation/proposals/show.html.erb +++ b/app/views/legislation/proposals/show.html.erb @@ -10,6 +10,17 @@ <%= render "shared/canonical", href: legislation_process_proposal_url(process_id: @process) %> <% end %> +
+
+
+

+ <%= t("legislation.proposals.process_title") %> +

+ <%= link_to @process.title, @process, class: "process-link" %> +
+
+
+ <% cache [locale_and_user_status(@proposal), @proposal, @proposal.author, Flag.flagged?(current_user, @proposal), @legislation_proposal_votes] do %>
diff --git a/config/locales/en/legislation.yml b/config/locales/en/legislation.yml index ab83e4b0df9..8d24194ae74 100644 --- a/config/locales/en/legislation.yml +++ b/config/locales/en/legislation.yml @@ -123,3 +123,4 @@ en: form: tags_label: "Categories" not_verified: "For vote proposals %{verify_account}." + process_title: Collaborative legislation process diff --git a/config/locales/es/legislation.yml b/config/locales/es/legislation.yml index 797f5d26ba6..6d45afca856 100644 --- a/config/locales/es/legislation.yml +++ b/config/locales/es/legislation.yml @@ -123,3 +123,4 @@ es: form: tags_label: "Categorías" not_verified: "Para votar propuestas %{verify_account}." + process_title: Proceso de legislación colaborativa diff --git a/spec/features/legislation/proposals_spec.rb b/spec/features/legislation/proposals_spec.rb index 91af4b109ca..76a76f4d02e 100644 --- a/spec/features/legislation/proposals_spec.rb +++ b/spec/features/legislation/proposals_spec.rb @@ -190,4 +190,15 @@ def legislation_proposals_order visit legislation_process_proposal_path(process, legislation_proposal_negative) expect(page).to have_content("-6 votes") end + + scenario "Show link to process on show" do + create(:legislation_proposal, legislation_process_id: process.id) + + visit legislation_process_proposal_path(proposal.process, proposal) + + within(".process-proposal") do + expect(page).to have_content("Collaborative legislation process") + expect(page).to have_link(process.title) + end + end end From 0154bc556d92cede96ae5ee66a1b4bcf13763728 Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 30 May 2019 00:34:18 +0200 Subject: [PATCH 4/7] Add link to comment path on comment date --- app/views/comments/_comment.html.erb | 7 ++++++- .../comments/budget_investments_spec.rb | 15 +++++++++++++++ spec/features/comments/debates_spec.rb | 15 +++++++++++++++ .../comments/legislation_annotations_spec.rb | 16 ++++++++++++++++ .../comments/legislation_questions_spec.rb | 15 +++++++++++++++ spec/features/comments/polls_spec.rb | 15 +++++++++++++++ spec/features/comments/proposals_spec.rb | 15 +++++++++++++++ spec/features/comments/topics_spec.rb | 17 +++++++++++++++++ 8 files changed, 114 insertions(+), 1 deletion(-) diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 886a39aaa23..e1dd210b6ca 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -61,7 +61,12 @@ <% end %> -  • <%= l comment.created_at.to_datetime, format: :datetime %> +  •  + + <%= link_to comment_path(comment) do %> + <%= l comment.created_at.to_datetime, format: :datetime %> + <% end %> +
li", count: 1) end + scenario "Link to comment show" do + comment = create(:comment, commentable: investment, user: user) + + visit budget_investment_path(investment.budget, investment) + + within "#comment_#{comment.id}" do + expect(page).to have_link comment.created_at.strftime("%Y-%m-%d %T") + end + + click_link comment.created_at.strftime("%Y-%m-%d %T") + + expect(page).to have_link "Go back to #{investment.title}" + expect(page).to have_current_path(comment_path(comment)) + end + scenario "Collapsable comments", :js do parent_comment = create(:comment, body: "Main comment", commentable: investment) child_comment = create(:comment, body: "First subcomment", commentable: investment, parent: parent_comment) diff --git a/spec/features/comments/debates_spec.rb b/spec/features/comments/debates_spec.rb index c8e17f17027..67f6f6efb9d 100644 --- a/spec/features/comments/debates_spec.rb +++ b/spec/features/comments/debates_spec.rb @@ -39,6 +39,21 @@ expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1) end + scenario "Link to comment show" do + comment = create(:comment, commentable: debate, user: user) + + visit debate_path(debate) + + within "#comment_#{comment.id}" do + expect(page).to have_link comment.created_at.strftime("%Y-%m-%d %T") + end + + click_link comment.created_at.strftime("%Y-%m-%d %T") + + expect(page).to have_link "Go back to #{debate.title}" + expect(page).to have_current_path(comment_path(comment)) + end + scenario "Collapsable comments", :js do parent_comment = create(:comment, body: "Main comment", commentable: debate) child_comment = create(:comment, body: "First subcomment", commentable: debate, parent: parent_comment) diff --git a/spec/features/comments/legislation_annotations_spec.rb b/spec/features/comments/legislation_annotations_spec.rb index 5b608058aef..cef55ddacfd 100644 --- a/spec/features/comments/legislation_annotations_spec.rb +++ b/spec/features/comments/legislation_annotations_spec.rb @@ -44,6 +44,22 @@ expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1) end + scenario "Link to comment show" do + comment = create(:comment, commentable: legislation_annotation, user: user) + + visit legislation_process_draft_version_annotation_path(legislation_annotation.draft_version.process, + legislation_annotation.draft_version, + legislation_annotation) + + within "#comment_#{comment.id}" do + expect(page).to have_link comment.created_at.strftime("%Y-%m-%d %T") + click_link comment.created_at.strftime("%Y-%m-%d %T") + end + + expect(page).to have_link "Go back to #{legislation_annotation.title}" + expect(page).to have_current_path(comment_path(comment)) + end + scenario "Collapsable comments", :js do parent_comment = legislation_annotation.comments.first child_comment = create(:comment, body: "First subcomment", commentable: legislation_annotation, parent: parent_comment) diff --git a/spec/features/comments/legislation_questions_spec.rb b/spec/features/comments/legislation_questions_spec.rb index 67be1f55dfa..9a7757016fb 100644 --- a/spec/features/comments/legislation_questions_spec.rb +++ b/spec/features/comments/legislation_questions_spec.rb @@ -46,6 +46,21 @@ expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1) end + scenario "Link to comment show" do + comment = create(:comment, commentable: legislation_question, user: user) + + visit legislation_process_question_path(legislation_question.process, legislation_question) + + within "#comment_#{comment.id}" do + expect(page).to have_link comment.created_at.strftime("%Y-%m-%d %T") + end + + click_link comment.created_at.strftime("%Y-%m-%d %T") + + expect(page).to have_link "Go back to #{legislation_question.title}" + expect(page).to have_current_path(comment_path(comment)) + end + scenario "Collapsable comments", :js do parent_comment = create(:comment, body: "Main comment", commentable: legislation_question) child_comment = create(:comment, body: "First subcomment", commentable: legislation_question, parent: parent_comment) diff --git a/spec/features/comments/polls_spec.rb b/spec/features/comments/polls_spec.rb index 1a4c20664f1..09c6611d264 100644 --- a/spec/features/comments/polls_spec.rb +++ b/spec/features/comments/polls_spec.rb @@ -40,6 +40,21 @@ expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1) end + scenario "Link to comment show" do + comment = create(:comment, commentable: poll, user: user) + + visit poll_path(poll) + + within "#comment_#{comment.id}" do + expect(page).to have_link comment.created_at.strftime("%Y-%m-%d %T") + end + + click_link comment.created_at.strftime("%Y-%m-%d %T") + + expect(page).to have_link "Go back to #{poll.title}" + expect(page).to have_current_path(comment_path(comment)) + end + scenario "Collapsable comments", :js do parent_comment = create(:comment, body: "Main comment", commentable: poll) child_comment = create(:comment, body: "First subcomment", commentable: poll, parent: parent_comment) diff --git a/spec/features/comments/proposals_spec.rb b/spec/features/comments/proposals_spec.rb index d86b016a919..3325f632ac3 100644 --- a/spec/features/comments/proposals_spec.rb +++ b/spec/features/comments/proposals_spec.rb @@ -38,6 +38,21 @@ expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1) end + scenario "Link to comment show" do + comment = create(:comment, commentable: proposal, user: user) + + visit proposal_path(proposal) + + within "#comment_#{comment.id}" do + expect(page).to have_link comment.created_at.strftime("%Y-%m-%d %T") + end + + click_link comment.created_at.strftime("%Y-%m-%d %T") + + expect(page).to have_link "Go back to #{proposal.title}" + expect(page).to have_current_path(comment_path(comment)) + end + scenario "Collapsable comments", :js do parent_comment = create(:comment, body: "Main comment", commentable: proposal) child_comment = create(:comment, body: "First subcomment", commentable: proposal, parent: parent_comment) diff --git a/spec/features/comments/topics_spec.rb b/spec/features/comments/topics_spec.rb index b6b918055f6..193678b16ad 100644 --- a/spec/features/comments/topics_spec.rb +++ b/spec/features/comments/topics_spec.rb @@ -39,6 +39,23 @@ expect(page).to have_link "Go back to #{topic.title}", href: community_topic_path(community, topic) end + scenario "Link to comment show" do + community = proposal.community + topic = create(:topic, community: community) + comment = create(:comment, commentable: topic, user: user) + + visit community_topic_path(community, topic) + + within "#comment_#{comment.id}" do + expect(page).to have_link comment.created_at.strftime("%Y-%m-%d %T") + end + + click_link comment.created_at.strftime("%Y-%m-%d %T") + + expect(page).to have_link "Go back to #{topic.title}" + expect(page).to have_current_path(comment_path(comment)) + end + scenario "Collapsable comments", :js do community = proposal.community topic = create(:topic, community: community) From 6b85ed87473b1a45f3f9612ccb1ddad509c93385 Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 30 May 2019 00:35:24 +0200 Subject: [PATCH 5/7] Add show and collapse text on comments tree --- app/views/comments/_comment.html.erb | 4 +++- config/locales/en/general.yml | 8 ++++++++ config/locales/es/general.yml | 12 ++++++++++-- spec/features/comments/budget_investments_spec.rb | 5 +++++ .../comments/budget_investments_valuation_spec.rb | 5 +++++ spec/features/comments/debates_spec.rb | 5 +++++ .../comments/legislation_annotations_spec.rb | 5 +++++ spec/features/comments/legislation_questions_spec.rb | 5 +++++ spec/features/comments/polls_spec.rb | 5 +++++ spec/features/comments/proposals_spec.rb | 5 +++++ spec/features/comments/topics_spec.rb | 5 +++++ 11 files changed, 61 insertions(+), 3 deletions(-) diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index e1dd210b6ca..9fc0f875b31 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -86,7 +86,9 @@ <%= link_to "", class: "js-toggle-children relative", data: {"id": "#{dom_id(comment)}"} do %> <%= t("shared.hide") %> - <%= t("comments.comment.responses", count: comment.children.size) %> + + + <%= t("comments.comment.responses_collapse", count: comment.children.size) %> <% end %> <% else %> <%= t("comments.comment.responses", count: 0) %> diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 820319ae667..a748e0f9094 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -51,6 +51,14 @@ en: one: 1 response other: "%{count} responses" zero: No responses + responses_show: + one: "1 response (show)" + other: "%{count} responses (show)" + zero: No responses + responses_collapse: + one: "1 response (collapse)" + other: "%{count} responses (collapse)" + zero: No responses user_deleted: User deleted votes: one: 1 vote diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index deb858d95eb..bb0182532eb 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -49,8 +49,16 @@ es: moderator: Moderador responses: zero: Sin respuestas - one: 1 Respuesta - other: "%{count} Respuestas" + one: 1 respuesta + other: "%{count} respuestas" + responses_show: + one: "1 respuesta (mostrar)" + other: "%{count} respuestas (mostrar)" + zero: Sin respuestas + responses_collapse: + one: "1 respuesta (colapsar)" + other: "%{count} respuestas (colapsar)" + zero: Sin respuestas user_deleted: Usuario eliminado votes: zero: Sin votos diff --git a/spec/features/comments/budget_investments_spec.rb b/spec/features/comments/budget_investments_spec.rb index 1655be46b58..b5f064d9337 100644 --- a/spec/features/comments/budget_investments_spec.rb +++ b/spec/features/comments/budget_investments_spec.rb @@ -67,20 +67,25 @@ visit budget_investment_path(investment.budget, investment) expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 2) + expect(page).to have_content("1 response (collapse)") + expect(page).to have_content("1 response (show)") expect(page).not_to have_content grandchild_comment.body find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) expect(page).to have_content grandchild_comment.body find("#comment_#{parent_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 1) + expect(page).to have_content("1 response (show)") expect(page).not_to have_content child_comment.body expect(page).not_to have_content grandchild_comment.body end diff --git a/spec/features/comments/budget_investments_valuation_spec.rb b/spec/features/comments/budget_investments_valuation_spec.rb index 4099b652407..1acb5819c0a 100644 --- a/spec/features/comments/budget_investments_valuation_spec.rb +++ b/spec/features/comments/budget_investments_valuation_spec.rb @@ -74,20 +74,25 @@ visit valuation_budget_budget_investment_path(budget, investment) expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 2) + expect(page).to have_content("1 response (collapse)") + expect(page).to have_content("1 response (show)") expect(page).not_to have_content grandchild_comment.body find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) expect(page).to have_content grandchild_comment.body find("#comment_#{parent_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 1) + expect(page).to have_content("1 response (show)") expect(page).not_to have_content child_comment.body expect(page).not_to have_content grandchild_comment.body end diff --git a/spec/features/comments/debates_spec.rb b/spec/features/comments/debates_spec.rb index 67f6f6efb9d..9e9734f0b09 100644 --- a/spec/features/comments/debates_spec.rb +++ b/spec/features/comments/debates_spec.rb @@ -62,20 +62,25 @@ visit debate_path(debate) expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 2) + expect(page).to have_content("1 response (collapse)") + expect(page).to have_content("1 response (show)") expect(page).not_to have_content grandchild_comment.body find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) expect(page).to have_content grandchild_comment.body find("#comment_#{parent_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 1) + expect(page).to have_content("1 response (show)") expect(page).not_to have_content child_comment.body expect(page).not_to have_content grandchild_comment.body end diff --git a/spec/features/comments/legislation_annotations_spec.rb b/spec/features/comments/legislation_annotations_spec.rb index cef55ddacfd..1b3da82117c 100644 --- a/spec/features/comments/legislation_annotations_spec.rb +++ b/spec/features/comments/legislation_annotations_spec.rb @@ -70,20 +70,25 @@ legislation_annotation) expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 2) + expect(page).to have_content("1 response (collapse)") + expect(page).to have_content("1 response (show)") expect(page).not_to have_content grandchild_comment.body find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) expect(page).to have_content grandchild_comment.body find("#comment_#{parent_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 1) + expect(page).to have_content("1 response (show)") expect(page).not_to have_content child_comment.body expect(page).not_to have_content grandchild_comment.body end diff --git a/spec/features/comments/legislation_questions_spec.rb b/spec/features/comments/legislation_questions_spec.rb index 9a7757016fb..ecd1a0988c5 100644 --- a/spec/features/comments/legislation_questions_spec.rb +++ b/spec/features/comments/legislation_questions_spec.rb @@ -69,20 +69,25 @@ visit legislation_process_question_path(legislation_question.process, legislation_question) expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 2) + expect(page).to have_content("1 response (collapse)") + expect(page).to have_content("1 response (show)") expect(page).not_to have_content grandchild_comment.body find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) expect(page).to have_content grandchild_comment.body find("#comment_#{parent_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 1) + expect(page).to have_content("1 response (show)") expect(page).not_to have_content child_comment.body expect(page).not_to have_content grandchild_comment.body end diff --git a/spec/features/comments/polls_spec.rb b/spec/features/comments/polls_spec.rb index 09c6611d264..8a1fb1b27d9 100644 --- a/spec/features/comments/polls_spec.rb +++ b/spec/features/comments/polls_spec.rb @@ -63,20 +63,25 @@ visit poll_path(poll) expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 2) + expect(page).to have_content("1 response (collapse)") + expect(page).to have_content("1 response (show)") expect(page).not_to have_content grandchild_comment.body find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) expect(page).to have_content grandchild_comment.body find("#comment_#{parent_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 1) + expect(page).to have_content("1 response (show)") expect(page).not_to have_content child_comment.body expect(page).not_to have_content grandchild_comment.body end diff --git a/spec/features/comments/proposals_spec.rb b/spec/features/comments/proposals_spec.rb index 3325f632ac3..9c0ae0cb3c7 100644 --- a/spec/features/comments/proposals_spec.rb +++ b/spec/features/comments/proposals_spec.rb @@ -61,20 +61,25 @@ visit proposal_path(proposal) expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 2) + expect(page).to have_content("1 response (collapse)") + expect(page).to have_content("1 response (show)") expect(page).not_to have_content grandchild_comment.body find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) expect(page).to have_content grandchild_comment.body find("#comment_#{parent_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 1) + expect(page).to have_content("1 response (show)") expect(page).not_to have_content child_comment.body expect(page).not_to have_content grandchild_comment.body end diff --git a/spec/features/comments/topics_spec.rb b/spec/features/comments/topics_spec.rb index 193678b16ad..ff6059e3d78 100644 --- a/spec/features/comments/topics_spec.rb +++ b/spec/features/comments/topics_spec.rb @@ -66,20 +66,25 @@ visit community_topic_path(community, topic) expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 2) + expect(page).to have_content("1 response (collapse)") + expect(page).to have_content("1 response (show)") expect(page).not_to have_content grandchild_comment.body find("#comment_#{child_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 3) + expect(page).to have_content("1 response (collapse)", count: 2) expect(page).to have_content grandchild_comment.body find("#comment_#{parent_comment.id}_children_arrow").click expect(page).to have_css(".comment", count: 1) + expect(page).to have_content("1 response (show)") expect(page).not_to have_content child_comment.body expect(page).not_to have_content grandchild_comment.body end From c1d5c7b1b7bf86fc3ade474350723e2a2153d406 Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 30 May 2019 00:35:55 +0200 Subject: [PATCH 6/7] Remove send notification proposal from community --- app/views/communities/show.html.erb | 8 -------- config/locales/en/general.yml | 2 -- config/locales/es/general.yml | 2 -- 3 files changed, 12 deletions(-) diff --git a/app/views/communities/show.html.erb b/app/views/communities/show.html.erb index 91b70dd6270..fee2108ebd5 100644 --- a/app/views/communities/show.html.erb +++ b/app/views/communities/show.html.erb @@ -29,14 +29,6 @@