Open micro7duylong opened 1 year ago
The sign-in screen includes one fields: phone number and an option to sign in with a phone number, GG sign in and FB sign in:
1.1 Login with phone number form is not showing up: 1.2. Login Button not working properly (disabled/enable When Visitor types invalid/valid Phone number ,.) 1.3. The Visitor is prompted to enter their phone number and receive a verification code via SMS.
Visitor submits invalid form:
2.1 get message error correctly when submits invalid form. 2.2 get message error correctly when submits invalid form but still be navigate to OTP verification. 2.3 submits invalid form but message error is not correctly.
Visitor enter a valid phone number, which is not associated with an existing account
3.1 the visitor is prompted a option to create a new account at Sign Up page. 3.2 visitor press at link but not be navigated to Sign Up page. 3.3 the visitor is not prompted any option.
Visitor enter a valid phone number which associated with an existing account
4.1 phone number associated with an existing account then navigate user to OTP verification 4.2 phone number associated with an existing account but system is not navigate user to OTP verification.
5.̶ ̶T̶̶h̶̶e̶ ̶r̶̶e̶̶g̶̶i̶̶o̶̶n̶ ̶p̶̶h̶̶o̶̶n̶̶e̶ ̶n̶̶u̶̶m̶̶b̶̶e̶̶r̶ ̶i̶̶s̶ ̶n̶̶o̶̶t̶ ̶s̶̶u̶̶p̶̶p̶̶o̶̶r̶̶t̶ ̶
5.̶̶1̶ ̶T̶̶h̶̶e̶ ̶V̶̶i̶̶s̶̶i̶̶t̶̶o̶̶r̶ ̶i̶̶s̶ ̶p̶̶r̶̶o̶̶m̶̶p̶̶t̶̶e̶̶d̶ ̶t̶̶h̶̶e̶ ̶r̶̶e̶̶g̶̶i̶̶o̶̶n̶ ̶p̶̶h̶̶o̶̶n̶̶e̶ ̶n̶̶u̶̶m̶̶b̶̶e̶̶r̶ ̶i̶̶s̶ ̶n̶̶o̶̶t̶ ̶s̶̶u̶̶p̶̶p̶̶o̶̶r̶̶t̶̶.̶ ̶ 5.̶̶2̶ ̶V̶̶i̶̶s̶̶i̶̶t̶̶o̶̶r̶ ̶i̶̶s̶ ̶p̶̶r̶̶o̶̶m̶̶p̶̶t̶̶e̶̶d̶ ̶a̶̶n̶ ̶a̶̶n̶̶o̶̶t̶̶h̶̶e̶̶r̶ ̶o̶̶p̶̶t̶̶i̶̶o̶̶n̶ ̶t̶̶o̶ ̶s̶̶i̶̶g̶̶n̶ ̶i̶̶n̶̶.̶ ̶ 5.̶̶3̶ ̶V̶̶i̶̶s̶̶i̶̶t̶̶o̶̶r̶ ̶i̶̶s̶ ̶n̶̶o̶̶t̶ ̶p̶̶r̶̶o̶̶m̶̶p̶̶t̶̶e̶̶d̶ ̶a̶̶n̶ ̶a̶̶n̶̶o̶̶t̶̶h̶̶e̶̶r̶ ̶o̶̶p̶̶t̶̶i̶̶o̶̶n̶ ̶t̶̶o̶ ̶s̶̶i̶̶g̶̶n̶ ̶i̶̶n̶̶.̶
mô tả bối cảnh có thể xảy ra:
@authentication @signin @phone @visitor As a user of ComeBack App, named Bruce Bruce want to be able to sign in using my phone number, So that Bruce can easily and securely access the app without having to remember a username or password.
@authentication @signin @phonenumber #@visitor
Background: Given The system is working properly And Bruce is on the sign in screen
Scenario: 1. Phone number is associated with an existing account When Bruce enter valid but Phone number is associated with an existing account And Bruce click on the "Sign In" button Then the system suggest Bruce to go to the registration page
Scenario: 2. Phone number is not associated with an existing account When Bruce enter valid Phone number which is associated with an existing account And Bruce click on the "Sign In" button Then the system navigate Bruce to go to the verification OTP page
Scenario Outline: Bruce types invalid or valid phone number. When Visitor types the phone number field with. Then System expect to be navigate Bruce to go to the verification OTP page. Examples:
| value | result |
| " " | "invalid " |
| "012345678a" | "invalid " |
| "03793186" | "invalid " |
| "+841234567" | "invalid " |
| "0123456789" | "valid" |
| "+84123456789" | "valid" |
APIs Contract
{ "Content-Type": "application/json" } Body: { "phone_number": "string", }
Status Code: 200 Headers: { "Content-Type": "application/json" } Body: { "id": "string", "name": "string", "phone_number": "string", "access_token": "string" } Error Headers: { "Content-Type": "application/json" } Status Code: 400 Body: { "error": "invalid_request", "error_description": "The request is missing a required parameter, includes an unsupported parameter or parameter value, or is otherwise malformed." } Status Code: 401 Body: { "error": "unauthorized", "error_description": "The phone number or password is incorrect." } Status Code: 404 Body: { "error": "not_found", "error_description": "The phone number is not associated with an existing account." } Status Code: 500 Body: { "error": "server_error", "error_description": "The server encountered an internal error or misconfiguration and was unable to complete your request." }
nhaps 1.2 Visitor does not see the sign up button on the dash board. 1.3. Visitor taps sign-up button but sign-up form does not appear.
Feature: Sign In with Phone Number @authentication @phone @visitor @signin As a user of ComeBack App, named Bruce Bruce want to be able to sign in using my phone number, So that Bruce can easily and securely access the app without having to remember a username or password.
feature extend: Verify Phone Number with OTP
Note: This user story assumes that the app offers the option to sign in using a phone number as an alternative to using a username and password. This feature provides a quick and convenient way to access the app, particularly for users who may have difficulty remembering login credentials. The app can also use this feature to send verification codes to the user's phone number to ensure secure login and protect the user's account information.