|
|
@ -38,18 +38,18 @@ RSpec.describe "Sales Log Features" do |
|
|
|
visit("/sales-logs") |
|
|
|
visit("/sales-logs") |
|
|
|
click_button("Create a new sales log") |
|
|
|
click_button("Create a new sales log") |
|
|
|
click_link("Set up this sales log") |
|
|
|
click_link("Set up this sales log") |
|
|
|
fill_in("sales_log[purchid]", with: "PC123") |
|
|
|
|
|
|
|
click_button("Save and continue") |
|
|
|
|
|
|
|
fill_in("sales_log[saledate(1i)]", with: "2022") |
|
|
|
fill_in("sales_log[saledate(1i)]", with: "2022") |
|
|
|
fill_in("sales_log[saledate(2i)]", with: "08") |
|
|
|
fill_in("sales_log[saledate(2i)]", with: "08") |
|
|
|
fill_in("sales_log[saledate(3i)]", with: "10") |
|
|
|
fill_in("sales_log[saledate(3i)]", with: "10") |
|
|
|
click_button("Save and continue") |
|
|
|
click_button("Save and continue") |
|
|
|
|
|
|
|
fill_in("sales_log[purchid]", with: "PC123") |
|
|
|
|
|
|
|
click_button("Save and continue") |
|
|
|
log_id = page.current_path.scan(/\d/).join |
|
|
|
log_id = page.current_path.scan(/\d/).join |
|
|
|
visit("sales-logs/#{log_id}/setup/check-answers") |
|
|
|
visit("sales-logs/#{log_id}/setup/check-answers") |
|
|
|
expect(page).to have_content("Purchaser code") |
|
|
|
|
|
|
|
expect(page).to have_content("PC123") |
|
|
|
|
|
|
|
expect(page).to have_content("Sale completion date") |
|
|
|
expect(page).to have_content("Sale completion date") |
|
|
|
expect(page).to have_content("2022") |
|
|
|
expect(page).to have_content("2022") |
|
|
|
|
|
|
|
expect(page).to have_content("Purchaser code") |
|
|
|
|
|
|
|
expect(page).to have_content("PC123") |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|