From ccf2351673a9b7ed999c6a2e4c57ec8c26e2a1c1 Mon Sep 17 00:00:00 2001 From: Anna Topalidi Date: Wed, 15 May 2024 18:18:57 +0200 Subject: [PATCH] fix tests --- spec/shared/vote_examples.rb | 2 +- spec/system/decidim/preview_vote_online_spec.rb | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/shared/vote_examples.rb b/spec/shared/vote_examples.rb index cc7ff92c..aeb61cbe 100644 --- a/spec/shared/vote_examples.rb +++ b/spec/shared/vote_examples.rb @@ -77,7 +77,7 @@ def uses_the_voting_booth(census_data) # confirm step non_question_step("#step-1") do - expect(page).to have_content("CONFIRM YOUR VOTE") + expect(page).to have_content("Confirm your vote") selected_answers.each { |answer| expect(page).to have_i18n_content(answer.title) } non_selected_answers.each { |answer| expect(page).not_to have_i18n_content(answer.title) } diff --git a/spec/system/decidim/preview_vote_online_spec.rb b/spec/system/decidim/preview_vote_online_spec.rb index c8cb382b..451d6480 100644 --- a/spec/system/decidim/preview_vote_online_spec.rb +++ b/spec/system/decidim/preview_vote_online_spec.rb @@ -21,6 +21,7 @@ describe "preview voting with the admin" do it "can vote", :slow do visit_component + check("Upcoming") click_link_or_button translated(election.title) click_link_or_button "Preview" @@ -41,6 +42,7 @@ it "shows a link to view more information about the election" do visit_component + check("Upcoming") click_link_or_button translated(election.title) click_link_or_button "Preview" login_step({ email: admin.email, token: "123456" }) @@ -57,9 +59,10 @@ it "does not show the more information link" do visit_component + check("Upcoming") click_link_or_button translated(election.title) click_link_or_button "Preview" - expect(page).to have_no_content("MORE INFORMATION") + expect(page).to have_no_content("More information") end end end @@ -86,7 +89,7 @@ context "when the ballot was not send" do it "is alerted when trying to leave the component before completing" do visit_component - + check("Upcoming") click_link_or_button translated(election.title) click_link_or_button "Preview"