Skip to content

Commit e00cd79

Browse files
authored
Merge pull request #583 from DataIntegrationGroup/marissa-wl-csv
`test(features): enforce lexicon values for water-level descriptor fields
2 parents bc051f3 + 5471b0b commit e00cd79

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

tests/features/water-level-csv.feature

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Feature: Bulk upload water level entries from CSV via CLI
3131
And each "well_name_point_id" value matches an existing well
3232
And "field_event_date_time" values are valid ISO 8601 timezone-naive datetime strings (e.g. "2025-02-15T08:00:00")
3333
And "water_level_date_time" values are valid ISO 8601 timezone-naive datetime strings (e.g. "2025-02-15T10:30:00")
34+
And when provided, "sample_method", "level_status", and "data_quality" values are valid lexicon values
3435
And the CSV includes optional fields when available:
3536
| optional field name |
3637
| field_staff_2 |
@@ -141,13 +142,13 @@ Feature: Bulk upload water level entries from CSV via CLI
141142
And stderr should contain validation errors identifying the invalid field and row
142143
And no water level entries are imported
143144

144-
@negative @validation @string_fields @BDMS-TBD
145-
Scenario: Upload accepts free-text values for measuring person and water level descriptors
146-
Given my CSV file contains non-lexicon text values for "measuring_person", "sample_method", "level_status", and "data_quality"
145+
@negative @validation @lexicon_values @BDMS-TBD
146+
Scenario: Upload fails due to invalid lexicon values for water level descriptor fields
147+
Given my CSV file contains invalid lexicon values for "sample_method", "level_status", or "data_quality"
147148
When I run the CLI command:
148149
"""
149150
oco water-levels bulk-upload --file ./water_levels.csv
150151
"""
151-
Then the command exits with code 0
152-
And all water level entries are imported
153-
And stderr should be empty
152+
Then the command exits with a non-zero exit code
153+
And stderr should contain validation errors identifying the invalid field and row
154+
And no water level entries are imported

0 commit comments

Comments
 (0)