Browse Source

update test broken by changes

pull/1388/head
Arthur Campbell 3 years ago
parent
commit
0805c500f4
  1. 12
      spec/features/form/conditional_questions_spec.rb

12
spec/features/form/conditional_questions_spec.rb

@ -54,13 +54,13 @@ RSpec.describe "Form Conditional Questions" do
end end
it "gets cleared if the conditional question is hidden after editing the answer" do it "gets cleared if the conditional question is hidden after editing the answer" do
sales_log.update!(national: 12, othernational: "other") sales_log.update!(age1_known: 0, age1: 50)
visit("/sales-logs/#{sales_log.id}/buyer-1-nationality") visit("/sales-logs/#{sales_log.id}/buyer-1-age")
expect(page).to have_field("sales-log-othernational-field", with: "other") expect(page).to have_field("sales-log-age1-field", with: 50)
choose("sales-log-national-18-field", allow_label_click: true) choose("sales-log-age1-known-1-field", allow_label_click: true)
choose("sales-log-national-12-field", allow_label_click: true) choose("sales-log-age1-known-0-field", allow_label_click: true)
expect(page).to have_field("sales-log-othernational-field", with: "") expect(page).to have_field("sales-log-age1-field", with: "")
end end
end end
end end

Loading…
Cancel
Save