From 0805c500f42d31a41e9b8d3b9a14ff90fe5825f7 Mon Sep 17 00:00:00 2001 From: Arthur Campbell Date: Tue, 7 Mar 2023 11:30:34 +0000 Subject: [PATCH] update test broken by changes --- spec/features/form/conditional_questions_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/features/form/conditional_questions_spec.rb b/spec/features/form/conditional_questions_spec.rb index 4fc9387da..52d8886e0 100644 --- a/spec/features/form/conditional_questions_spec.rb +++ b/spec/features/form/conditional_questions_spec.rb @@ -54,13 +54,13 @@ RSpec.describe "Form Conditional Questions" do end it "gets cleared if the conditional question is hidden after editing the answer" do - sales_log.update!(national: 12, othernational: "other") - visit("/sales-logs/#{sales_log.id}/buyer-1-nationality") - expect(page).to have_field("sales-log-othernational-field", with: "other") + sales_log.update!(age1_known: 0, age1: 50) + visit("/sales-logs/#{sales_log.id}/buyer-1-age") + expect(page).to have_field("sales-log-age1-field", with: 50) - choose("sales-log-national-18-field", allow_label_click: true) - choose("sales-log-national-12-field", allow_label_click: true) - expect(page).to have_field("sales-log-othernational-field", with: "") + choose("sales-log-age1-known-1-field", allow_label_click: true) + choose("sales-log-age1-known-0-field", allow_label_click: true) + expect(page).to have_field("sales-log-age1-field", with: "") end end end