-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow test support phone in dev mode #7851
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +145 B (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
Compatibility tests failing due to known issue: p1701263468047559-slack-CGGCLBN58 |
|
||
const [ isPhoneValid, setPhoneValidity ] = useState( true ); | ||
if ( ! isPhoneValid && ! isEmptyPhoneValid ) { | ||
if ( ! isPhoneValid && ! isEmptyPhoneValid && ! isDevModeEnabled ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This skips the phone check completely in the dev mode, and it's not ideal per these examples:
- +1 000 does not work.
- +1 0000 works.
- +1 1234 does not work.
Could we be more specific in checking this in the dev mode? I think it's also a nice idea to suggest using 0000
directly in the supportPhoneError
such as:
Please enter a valid phone number. Since you're using Dev Move, you can also use this test number
0000
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it more simple, may just use support phone label to carry out this message, and keep your current code.
Something like this https://gist.github.com/htdat/996a4178d630335d85636f3f979958e2
Update: My point here is that people in dev mode do not know which number to use as we no longer have validation because they might not always start with 0000
.
Modified the PR to accept the test number in dev mode. @htdat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Manual tests work ok.
✅ Code change makes sense.
Pre-approve with some nitpicks. Feel free to merge after addressing them.
Significance: patch | ||
Type: fix | ||
|
||
Allow test support phone in dev mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May update the title of the PR too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 @jessy-p - sorry for the confusion, I meant the title of this PR, not the changelog. I left the comment here so that you can pick up the same changelog entry. I would do better next time.
Currently, it's Skip support phone validation in dev mode
. You would update it to Allow test support phone in dev mode
.
It seems this PR was merged despite having errors in the JS tests, which are now present in the |
👋 I am looking at this issue, thanks @rafaelzaleski |
PR to fix the JS test: #7930 It seems the issue was still since the start of this PR but it was buried among other Woo beta compatibility tests. |
Fixes #6782
Changes proposed in this Pull Request
Testing instructions
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge