add specs to check if filming hours is present in form and contract

This commit is contained in:
bilal
2020-06-03 11:12:31 +02:00
parent 300f5d98c5
commit 284e83ddc9

View File

@@ -17,6 +17,7 @@ feature "User managing location releases" do
fill_in person_phone_field, with: "555-555-5555"
fill_in person_email_field, with: "jane.doe@test.com"
fill_in person_address_street1_field, with: "100 Broadway"
fill_in filming_hours_field, with: "04:00 - 22:00"
draw_signature file_fixture("signature.png"), "location_release_signature_base64"
end
@@ -51,6 +52,7 @@ feature "User managing location releases" do
by "filling out the remaining information" do
fill_in_release_fields name: "Test Location Release"
fill_in filming_hours_field, with: "04:00 - 22:00"
click_button create_release_button
expect(page).to have_content(create_release_notice)
expect(page).to have_photo("location_photo.png")
@@ -136,6 +138,7 @@ feature "User managing location releases" do
:native,
project: project,
name: "Benny's Burritos",
filming_hours: "06:00 - 20:00",
tag_list: "Restaurant",
notes: [
build(:note,
@@ -172,6 +175,8 @@ feature "User managing location releases" do
expect(pdf_body).to have_content("Restaurant")
expect(pdf_body).to have_content photos_heading.upcase
expect(pdf_body).to have_content("location_photo.png")
expect(pdf_body).to have_content("Filming Hours")
expect(pdf_body).to have_content("06:00 - 20:00")
end
context "when the user is associate" do
@@ -222,6 +227,10 @@ feature "User managing location releases" do
"location_release[person_phone]"
end
def filming_hours_field
"location_release[filming_hours]"
end
def have_photo(filename, attr: "src")
have_selector("img[#{attr}*='#{filename}']")
end