Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antopalidi committed May 15, 2024
1 parent 7be06ca commit ccf2351
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/shared/vote_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down
7 changes: 5 additions & 2 deletions spec/system/decidim/preview_vote_online_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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" })
Expand All @@ -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
Expand All @@ -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"

Expand Down

0 comments on commit ccf2351

Please sign in to comment.