[ALFMOB-424] Fix failing checkout integration tests (valid phone fixture) - #83
Draft
amccall-mindera wants to merge 1 commit into
Draft
[ALFMOB-424] Fix failing checkout integration tests (valid phone fixture)#83amccall-mindera wants to merge 1 commit into
amccall-mindera wants to merge 1 commit into
Conversation
The 3 failing checkout integration tests all stalled at the contact information screen: its Continue button is gated on UserData.isValid(), which calls FormUtils.validatePhoneNumber -> PhoneNumber.parse().isValid (phonenumbers_core, added in ALFMOB-326). The fixture '+1234567890' is not a valid number (only 9 digits after +1), so the button never enabled: - 'Submit button disabled when form is invalid' asserted the button becomes enabled once all fields are filled (got false). - 'User can proceed through checkout successfully' tapped a disabled Continue, never reached the Delivery Information screen. - 'UI state updates correctly during checkout' did the same, then threw StateError filling delivery fields that were never rendered. Replace the fixture with '+44 7700 900000', the same valid number the form_utils unit test uses. App validation behaviour is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Fix the 3 failing checkout integration tests in
checkout_integration_test.dartby replacing the invalid phone fixture+1234567890with the valid+44 7700 900000.Why
ALFMOB-355 (#77) merged to
mainwith 3 red checkout integration tests. They all stalled at the contact information screen. Its Continue button is gated onUserData.isValid(), which callsFormUtils.validatePhoneNumber→PhoneNumber.parse(value).isValid(thephonenumbers_corevalidation added in ALFMOB-326).+1234567890is not a valid number (only 9 digits after+1), so the button never enabled:Submit button disabled when form is invalid— asserted the button becomes enabled once all fields are filled; gotfalse.User can proceed through checkout successfully— tapped a disabled Continue, so never reached theDelivery Informationscreen (find.text('Delivery Information')→ 0 widgets).UI state updates correctly during checkout— same stall, thenStateErrorfilling delivery fields that were never rendered.This is a stale test fixture, not an app bug — the production phone validation is correct and unchanged. These tests passed end-to-end before ALFMOB-326 tightened phone validation.
How
Replaced all 5 occurrences of
+1234567890in the test file with+44 7700 900000— the same known-valid number asserted intest/utils/form_utils_test.dart. The phone field has no input formatters, so the spaced value enters cleanly.Test
See
Link to JIRA: ALFMOB-424