Browse Source

CLDC-2670: Fix failing test

pull/2362/head
Robert Sullivan 2 years ago
parent
commit
51e952ab2d
  1. 4
      spec/features/form/check_answers_page_lettings_logs_spec.rb

4
spec/features/form/check_answers_page_lettings_logs_spec.rb

@ -89,11 +89,11 @@ RSpec.describe "Lettings Log Check Answers Page" do
# Regex explanation: match the string "Answer" but not if it's follow by "the missing questions" # Regex explanation: match the string "Answer" but not if it's follow by "the missing questions"
# This way only the links in the table will get picked up # This way only the links in the table will get picked up
it "has an answer link for questions missing an answer" do it "has an answer link without a referrer for questions missing an answer" do
visit("/lettings-logs/#{empty_lettings_log.id}/#{subsection}/check-answers?referrer=check_answers") visit("/lettings-logs/#{empty_lettings_log.id}/#{subsection}/check-answers?referrer=check_answers")
assert_selector "a", text: /Answer (?!the missing questions)/, count: 4 assert_selector "a", text: /Answer (?!the missing questions)/, count: 4
assert_selector "a", text: "Change", count: 0 assert_selector "a", text: "Change", count: 0
expect(page).to have_link("Answer", href: "/lettings-logs/#{empty_lettings_log.id}/person-1-age?referrer=check_answers") expect(page).to have_link("Answer", href: "/lettings-logs/#{empty_lettings_log.id}/person-1-age")
end end
it "has a change link for answered questions" do it "has a change link for answered questions" do

Loading…
Cancel
Save