Skip to content

`test(features): enforce lexicon values for water-level descriptor fields#583

Merged
ksmuczynski merged 1 commit intostagingfrom
marissa-wl-csv
Mar 4, 2026
Merged

`test(features): enforce lexicon values for water-level descriptor fields#583
ksmuczynski merged 1 commit intostagingfrom
marissa-wl-csv

Conversation

@marissafichera
Copy link
Copy Markdown
Contributor

Why

This PR addresses the following problem / context:

  • The water-level-csv.feature still allowed free-text behavior where sample_method, level_status, and data_quality should be enum/lexicon-constrained.
  • We need feature coverage that explicitly requires lexicon-valid values for those three fields.

How

Implementation summary - the following was changed / added / removed:

  • Updated tests/features/water-level-csv.feature only.
  • Added a happy-path requirement that, when provided, sample_method, level_status, and data_quality must be valid lexicon values.
  • Replaced the free-text acceptance scenario with a negative validation scenario that fails upload when those fields contain invalid lexicon values.
  • Kept expectations consistent with existing validation style:
    • non-zero exit code
    • validation errors identify row/field
    • no rows imported

Notes

Any special considerations, workarounds, or follow-up work to note?

  • This is a spec-only PR (no Python implementation changes).
  • If current step definitions still model the old free-text behavior, they may need a small follow-up to match this updated feature.

…elds

- Update water-level CSV feature to require lexicon-valid values (when provided) for:
  - sample_method
  - level_status
  - data_quality
- Replace free-text acceptance scenario with negative validation scenario for invalid lexicon values
- Keep failure expectations consistent: non-zero exit, field/row validation errors, and no imports`
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the water-level CSV bulk-upload BDD spec to require lexicon-constrained values for water-level descriptor fields, replacing prior free-text acceptance expectations.

Changes:

  • Added a happy-path requirement stating sample_method, level_status, and data_quality must be lexicon-valid when provided.
  • Replaced the free-text acceptance scenario with a negative validation scenario for invalid lexicon values.

Copy link
Copy Markdown
Contributor

@ksmuczynski ksmuczynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, approved!

@ksmuczynski ksmuczynski merged commit e00cd79 into staging Mar 4, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants