add specs to check if filming hours is present in form and contract
This commit is contained in:
@@ -17,6 +17,7 @@ feature "User managing location releases" do
|
|||||||
fill_in person_phone_field, with: "555-555-5555"
|
fill_in person_phone_field, with: "555-555-5555"
|
||||||
fill_in person_email_field, with: "jane.doe@test.com"
|
fill_in person_email_field, with: "jane.doe@test.com"
|
||||||
fill_in person_address_street1_field, with: "100 Broadway"
|
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"
|
draw_signature file_fixture("signature.png"), "location_release_signature_base64"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -51,6 +52,7 @@ feature "User managing location releases" do
|
|||||||
|
|
||||||
by "filling out the remaining information" do
|
by "filling out the remaining information" do
|
||||||
fill_in_release_fields name: "Test Location Release"
|
fill_in_release_fields name: "Test Location Release"
|
||||||
|
fill_in filming_hours_field, with: "04:00 - 22:00"
|
||||||
click_button create_release_button
|
click_button create_release_button
|
||||||
expect(page).to have_content(create_release_notice)
|
expect(page).to have_content(create_release_notice)
|
||||||
expect(page).to have_photo("location_photo.png")
|
expect(page).to have_photo("location_photo.png")
|
||||||
@@ -136,6 +138,7 @@ feature "User managing location releases" do
|
|||||||
:native,
|
:native,
|
||||||
project: project,
|
project: project,
|
||||||
name: "Benny's Burritos",
|
name: "Benny's Burritos",
|
||||||
|
filming_hours: "06:00 - 20:00",
|
||||||
tag_list: "Restaurant",
|
tag_list: "Restaurant",
|
||||||
notes: [
|
notes: [
|
||||||
build(:note,
|
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("Restaurant")
|
||||||
expect(pdf_body).to have_content photos_heading.upcase
|
expect(pdf_body).to have_content photos_heading.upcase
|
||||||
expect(pdf_body).to have_content("location_photo.png")
|
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
|
end
|
||||||
|
|
||||||
context "when the user is associate" do
|
context "when the user is associate" do
|
||||||
@@ -222,6 +227,10 @@ feature "User managing location releases" do
|
|||||||
"location_release[person_phone]"
|
"location_release[person_phone]"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def filming_hours_field
|
||||||
|
"location_release[filming_hours]"
|
||||||
|
end
|
||||||
|
|
||||||
def have_photo(filename, attr: "src")
|
def have_photo(filename, attr: "src")
|
||||||
have_selector("img[#{attr}*='#{filename}']")
|
have_selector("img[#{attr}*='#{filename}']")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user