Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Apr 3, 2024
1 parent a7cb9ba commit 43876d6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions spec/system/consultation_question_vote_callout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@

context "when user logged in" do
it "can visit the consultation" do
expect(page).to have_content(I18n.t("decidim.action_delegator.questions.callout_link_text"))
expect(page).to have_content("Review the summary of your vote here")
expect(page).to have_content(I18n.t("decidim.questions.vote_button.vote").upcase)
expect(page).to have_content(I18n.t("decidim.action_delegator.questions.callout_text"))
expect(page).to have_content("You have answered 0 from a total of 1 questions")
end

it "renders callout" do
click_link(I18n.t("decidim.action_delegator.questions.callout_link_text"))
expect(page).to have_content(I18n.t("decidim.action_delegator.questions.modal.modal_table_header_answer"))
expect(page).to have_content(I18n.t("decidim.action_delegator.questions.modal.modal_table_header_question"))
expect(page).to have_content(I18n.t("decidim.action_delegator.questions.modal.modal_votes_title"))
expect(page).to have_link(I18n.t("decidim.action_delegator.questions.question_not_answered"))
click_link("Review the summary of your vote here")
within "#consultations-questions-modal" do
expect(page).to have_content("Did you answer?")
expect(page).to have_content("Your votes in \"#{question.title["en"]}\"")
expect(page).to have_content(I18n.t("decidim.action_delegator.questions.modal.modal_votes_title"))
expect(page).to have_link("No, take me there", href: decidim_consultations.question_path(question))
end
end
end
end

0 comments on commit 43876d6

Please sign in to comment.