@@ -50,7 +50,7 @@ def step_step_step(context: Context):
5050
5151
5252@given (
53- "my CSV file contains a row that has an invalid postal code format in contact_1_address_1_postal_code"
53+ "my CSV file contains a row that has an invalid postal code format in contact_1_address_1_postal_code"
5454)
5555def step_step_step_2 (context : Context ):
5656 _set_file_content (context , "well-inventory-invalid-postal-code.csv" )
@@ -362,4 +362,76 @@ def step_step_step_21(context):
362362 _set_file_content (context , "well-inventory-missing-wl-fields.csv" )
363363
364364
365+ @given (
366+ "my CSV file contains a row with an address_type value that is not one of: Work, Personal, Mailing, Physical"
367+ )
368+ def step_given_row_contains_invalid_address_type_value (context : Context ):
369+ df = _get_valid_df (context )
370+ df .loc [0 , "contact_1_address_1_type" ] = "InvalidAddressType"
371+ _set_content_from_df (context , df )
372+
373+
374+ @given (
375+ "my CSV file contains a row with a state value that is not a valid 2-letter US state abbreviation"
376+ )
377+ def step_given_row_contains_invalid_state_value (context : Context ):
378+ df = _get_valid_df (context )
379+ df .loc [0 , "contact_1_address_1_state" ] = "New Mexico"
380+ _set_content_from_df (context , df )
381+
382+
383+ @given (
384+ 'my CSV file contains a row with a well_hole_status value that is not one of: "Abandoned", "Active, pumping well", "Destroyed, exists but not usable", "Inactive, exists but not used"'
385+ )
386+ def step_given_row_contains_invalid_well_hole_status_value (context : Context ):
387+ df = _get_valid_df (context )
388+ if "well_status" in df .columns :
389+ df .loc [0 , "well_status" ] = "NotARealWellHoleStatus"
390+ _set_content_from_df (context , df )
391+
392+
393+ @given (
394+ 'my CSV file contains a row with a monitoring_status value that is not one of: "Open", "Open (unequipped)", "Closed", "Datalogger can be installed", "Datalogger cannot be installed", "Abandoned", "Active, pumping well", "Destroyed, exists but not usable", "Inactive, exists but not used", "Currently monitored", "Not currently monitored"'
395+ )
396+ def step_given_row_contains_invalid_monitoring_status_value (context : Context ):
397+ df = _get_valid_df (context )
398+ if "monitoring_frequency" in df .columns :
399+ df .loc [0 , "monitoring_frequency" ] = "NotARealMonitoringStatus"
400+ _set_content_from_df (context , df )
401+
402+
403+ @given (
404+ 'my CSV file contains a row with a well_pump_type value that is not one of: "Submersible", "Jet", "Line Shaft", "Hand"'
405+ )
406+ def step_given_row_contains_invalid_well_pump_type_value (context : Context ):
407+ df = _get_valid_df (context )
408+ df .loc [0 , "well_pump_type" ] = "NotARealPumpType"
409+ _set_content_from_df (context , df )
410+
411+
412+ @given (
413+ 'my CSV file contains a row with contact fields filled but both "contact_1_name" and "contact_1_organization" are blank'
414+ )
415+ def step_given_row_contains_contact_fields_but_name_and_org_are_blank (context : Context ):
416+ df = _get_valid_df (context )
417+ df .loc [0 , "contact_1_name" ] = ""
418+ df .loc [0 , "contact_1_organization" ] = ""
419+ # Keep other contact data present so composite contact validation is exercised.
420+ df .loc [0 , "contact_1_role" ] = "Owner"
421+ df .loc [0 , "contact_1_type" ] = "Primary"
422+ _set_content_from_df (context , df )
423+
424+
425+ @given (
426+ 'my CSV file contains a row where "depth_to_water_ft" is filled but "water_level_date_time" is blank'
427+ )
428+ @given (
429+ 'my csv file contains a row where "depth_to_water_ft" is filled but "water_level_date_time" is blank'
430+ )
431+ def step_given_depth_to_water_is_filled_but_water_level_date_time_is_blank (
432+ context : Context ,
433+ ):
434+ _set_file_content (context , "well-inventory-missing-wl-fields.csv" )
435+
436+
365437# ============= EOF =============================================
0 commit comments