Repository navigation
[26557] Support minimum and maximum booking fare quantities - #545
Merged
Merged
Conversation
- Added nullable minimum quantity and shared fare quantity rules - Updated both fare selectors to enforce bounds and allow optional deselection - Validated selected fare IDs, quantities and single-fare restrictions before submission - Snapshotted fare selections to prevent pending request mutation - Improved handling of server validation errors - Added regression tests for quantity constraints and booking payloads
|
✅ Unit tests passed successfully! Test results are available under the "Artifacts" section of this run in GitHub Actions. Please ensure the code is reviewed before proceeding with the merge. |
…controls - Initialize required fares at their minimum and prevent decrementing below it - Apply consistent minimum and maximum rules across both fare selectors - Reject missing, zero and below-minimum required fares before submission - Preserve optional fares, legacy behavior, pricing and request snapshots - Handle conflicting singleFareOnly constraints without bypassing minimums - Keep compact controls with separate 48dp touch targets
|
❌ Unit tests failed! @MichaelReyes, please review and fix the issues in the unit tests. Test results are available under the "Artifacts" section of this run in GitHub Actions. Let us know if you need any help. |
|
✅ Unit tests passed successfully! Test results are available under the "Artifacts" section of this run in GitHub Actions. Please ensure the code is reviewed before proceeding with the merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request (PR) Checklist
PR Context
Changes
Android previously dropped the minimum fare quantity and inconsistently enforced maximum quantities. This change supports the quick-booking API’s
minandmaxconstraints while keeping additional-passenger fares optional.minsupport and shared quantity rules.Requests continue using
fareswith selected IDs and quantities. Fare-role validation remains server-owned, consistent with API PR #286.Checklist for Reviewers
Documentation and Code Quality
Testing and Reliability
waupacaStagingandwaupacaRelease. Real-device testing was not performed.Error Handling and Logging
Testing Procedure
FareQuantityJsonTest: 5DrtTicketViewModelTest: 10DrtFareSelectionViewModelTest: 5FareSelectionValidationTest: 4Focused validation command: