make all location release fields required for native release
This commit is contained in:
@@ -17,20 +17,35 @@ feature "User managing location releases" do
|
||||
|
||||
visit new_account_project_contract_template_location_release_path(project.account, project, contract_template)
|
||||
|
||||
click_button submit_release_button
|
||||
expect(page).not_to have_content submitted_release_notice
|
||||
|
||||
by "filling out the form" do
|
||||
fill_in location_name_field, with: "Benny's Burritos"
|
||||
fill_in address_street1_field, with: "100 Broadway"
|
||||
fill_in address_city_field, with: "D"
|
||||
fill_in address_state_field, with: "CA"
|
||||
fill_in address_zip_field, with: "123"
|
||||
fill_in person_first_name_field, with: "Jane"
|
||||
fill_in person_last_name_field, with: "Doe"
|
||||
fill_in person_phone_field, with: "555-555-5555"
|
||||
fill_in person_email_field, with: "jane.doe@test.com"
|
||||
fill_in person_company_field, with: "Inc"
|
||||
fill_in person_title_field, with: "Mrs."
|
||||
fill_in person_address_street1_field, with: "100 Broadway"
|
||||
fill_in person_address_city_field, with: "D"
|
||||
fill_in person_address_state_field, with: "CA"
|
||||
fill_in person_address_zip_field, with: "123"
|
||||
fill_filming_started_on_field
|
||||
fill_filming_ended_on_field
|
||||
fill_in filming_hours_field, with: "04:00 - 22:00"
|
||||
|
||||
draw_signature file_fixture("signature.png"), "location_release_signature_base64"
|
||||
end
|
||||
|
||||
click_button submit_release_button
|
||||
|
||||
expect(page).to have_content("Your release was successfully submitted. Thank you.")
|
||||
expect(page).to have_content submitted_release_notice
|
||||
end
|
||||
|
||||
scenario "creating a release with photos", js: true do
|
||||
@@ -251,14 +266,66 @@ feature "User managing location releases" do
|
||||
"location_release[person_email]"
|
||||
end
|
||||
|
||||
def person_company_field
|
||||
"location_release[person_company]"
|
||||
end
|
||||
|
||||
def person_title_field
|
||||
"location_release[person_title]"
|
||||
end
|
||||
|
||||
def address_street1_field
|
||||
"location_release[address_street1]"
|
||||
end
|
||||
|
||||
def address_city_field
|
||||
"location_release[address_city]"
|
||||
end
|
||||
|
||||
def address_state_field
|
||||
"location_release[address_state]"
|
||||
end
|
||||
|
||||
def address_zip_field
|
||||
"location_release[address_zip]"
|
||||
end
|
||||
|
||||
def address_country_field
|
||||
"location_release[address_country]"
|
||||
end
|
||||
|
||||
def person_address_street1_field
|
||||
"location_release[person_address_street1]"
|
||||
end
|
||||
|
||||
def person_address_city_field
|
||||
"location_release[person_address_city]"
|
||||
end
|
||||
|
||||
def person_address_state_field
|
||||
"location_release[person_address_state]"
|
||||
end
|
||||
|
||||
def person_address_zip_field
|
||||
"location_release[person_address_zip]"
|
||||
end
|
||||
|
||||
def person_address_country_field
|
||||
"location_release[person_address_country]"
|
||||
end
|
||||
|
||||
def person_phone_field
|
||||
"location_release[person_phone]"
|
||||
end
|
||||
|
||||
def fill_filming_started_on_field
|
||||
page.execute_script("$('#location_release_filming_started_on').val('01/03/20')")
|
||||
end
|
||||
|
||||
def fill_filming_ended_on_field
|
||||
page.execute_script("$('#location_release_filming_ended_on').val('03/03/20')")
|
||||
end
|
||||
|
||||
def filming_hours_field
|
||||
"location_release[filming_hours]"
|
||||
end
|
||||
@@ -291,6 +358,10 @@ feature "User managing location releases" do
|
||||
t("shared.submit_release_long")
|
||||
end
|
||||
|
||||
def submitted_release_notice
|
||||
"Your release was successfully submitted. Thank you."
|
||||
end
|
||||
|
||||
def create_release_notice
|
||||
t "location_releases.create.notice"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user