|
|
@ -60,17 +60,17 @@ RSpec.describe "Form Saving Data" do |
|
|
|
it "updates total value of the rent", js: true do |
|
|
|
it "updates total value of the rent", js: true do |
|
|
|
visit("/logs/#{id}/rent") |
|
|
|
visit("/logs/#{id}/rent") |
|
|
|
|
|
|
|
|
|
|
|
fill_in("case-log-brent-field", with: 3) |
|
|
|
fill_in("case-log-brent-field", with: 3.02) |
|
|
|
expect(page).to have_field("case-log-tcharge-field", with: "3") |
|
|
|
expect(page).to have_field("case-log-tcharge-field", with: "3.02") |
|
|
|
|
|
|
|
|
|
|
|
fill_in("case-log-scharge-field", with: 2) |
|
|
|
fill_in("case-log-scharge-field", with: 2.8) |
|
|
|
expect(page).to have_field("case-log-tcharge-field", with: "5") |
|
|
|
expect(page).to have_field("case-log-tcharge-field", with: "5.82") |
|
|
|
|
|
|
|
|
|
|
|
fill_in("case-log-pscharge-field", with: 1) |
|
|
|
fill_in("case-log-pscharge-field", with: 1) |
|
|
|
expect(page).to have_field("case-log-tcharge-field", with: "6") |
|
|
|
expect(page).to have_field("case-log-tcharge-field", with: "6.82") |
|
|
|
|
|
|
|
|
|
|
|
fill_in("case-log-supcharg-field", with: 4) |
|
|
|
fill_in("case-log-supcharg-field", with: 4.11) |
|
|
|
expect(page).to have_field("case-log-tcharge-field", with: "10") |
|
|
|
expect(page).to have_field("case-log-tcharge-field", with: "10.93") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "displays number answers in inputs if they are already saved" do |
|
|
|
it "displays number answers in inputs if they are already saved" do |
|
|
|