-
Notifications
You must be signed in to change notification settings - Fork 0
Test_Cases
- Last Modified: 2024-04-29
- Author: Phill Weston
The following test cases are performed according to the diagram of REST API endpoints for Lotso-Twitter-Auth. The test cases are designed to ensure that the API endpoints are functioning correctly and that the expected responses are returned.
-
Test Case: Verify that a user can successfully log in with Twitter and perform actions (Retweet, Like, Follow).
-
Steps:
- Step 1: Click 'Log in with Twitter'.
- Step 2: Log in and authorize on the Twitter auth page.
- Step 3: Click 'Retweet', 'Like', or 'Follow'.
-
Expected Result:
- After Step 1, a new tab for OAuth is opened and the user is redirected to the Twitter auth page.
- After Step 2, the user is redirected back to the application with access tokens passed to the frontend.
- After Step 3, the requested action is performed and the result (Success or Error) is displayed.
-
Steps:
-
Test Case: Verify that a user cannot log in with Twitter if they do not authorize the application.
-
Steps:
- Step 1: Click 'Log in with Twitter'.
- Step 2: Do not authorize on the Twitter auth page.
-
Expected Result:
- After Step 1, a new tab for OAuth is opened and the user is redirected to the Twitter auth page.
- After Step 2, the user is not redirected back to the application and no access tokens are passed to the frontend.
-
Steps:
-
Test Case: Verify that a user cannot perform actions (Retweet, Like, Follow) if they are not logged in.
-
Steps:
- Step 3: Click 'Retweet', 'Like', or 'Follow'.
-
Expected Result:
- After Step 3, the user is not able to perform the requested action and an error message is displayed.
-
Steps:
All endpoint tests are passed based on the previous test cases.
All endpoint tests are passed based on the previous test cases.
-
Test Case: Verify that a parent user can successfully claim the airdrop and generate a promotion code.
-
Steps:
- Step 1: Click the 'Check Eligibility' button.
- Step 2: Click 'Claim Airdrop'.
- Step 3: Click 'Confirm Airdrop'.
- Step 4: Click 'Generate Promotion Code'.
-
Expected Result:
- After Step 1, the user purchase status is displayed (rejected if not purchased).
- After Step 2, the transaction succeed result is displayed (rejected if airdrop is not available).
- After Step 3, the transaction result is displayed and a promotion code pops up.
- After Step 4, a promotion code is displayed.
-
Steps:
-
Test Case: Verify that a user cannot claim the airdrop if they have not purchased the $Lotso 1st generation token.
-
Steps:
- Step 1: Click the 'Check Eligibility' button.
-
Expected Result:
- After Step 1, the user is rejected because they have not purchased the token.
-
Steps:
-
Test Case: Verify that a user cannot claim the airdrop if they have not finished the required steps.
-
Steps:
- Step 1: Click the 'Check Eligibility' button.
-
Expected Result:
- After Step 1, the user is rejected because they have not finished the required steps.
-
Steps:
-
Test Case: Verify that a user cannot claim the airdrop if it is not available.
-
Steps:
- Step 2: Click 'Claim Airdrop'.
-
Expected Result:
- After Step 2, the user is rejected because the airdrop is not available.
-
Steps:
-
Test Case: Verify that a user cannot generate a promotion code if they have not finished the required steps.
-
Steps:
- Step 4: Click 'Generate Promotion Code'.
-
Expected Result:
- After Step 4, the user is rejected because they have not finished the required steps.
-
Steps:
-
Test Case: Verify that a child user can successfully claim the airdrop and generate a promotion code using the parent user's promotion code.
-
Steps:
- Step 1: Input the parent user's promotion code after finishing the required missions.
- Step 2: Click the 'Check Eligibility' button.
- Step 3: Click 'Claim Airdrop'.
- Step 4: Click 'Confirm Airdrop'.
- Step 5: Click 'Generate Promotion Code'.
-
Expected Result:
- After Step 1, the user purchase status is displayed (rejected if not purchased).
- After Step 2, the transaction succeed result is displayed (rejected if airdrop is not available).
- After Step 3, the transaction result is displayed and a promotion code pops up.
- After Step 4, a promotion code is displayed.
-
Steps:
-
Test Case: Verify that a child user cannot claim the airdrop if they have not purchased the $Lotso 1st generation token and input the parent user's promotion code.
-
Steps:
- Step 1: Click the 'Check Eligibility' button.
-
Expected Result:
- After Step 1, the user need to input the promotion code to claim the airdrop.
-
Steps:
-
Test Case: Verify that a child user cannot claim the airdrop if the promotion code is invalid.
-
Steps:
- Step 1: Input an invalid promotion code.
- Step 2: Click the 'Check Eligibility' button.
-
Expected Result:
- After Step 1, the user is rejected because the promotion code is invalid.
-
Steps:
-
Test Case: Verify that a child user cannot claim the airdrop if they have not finished the required steps.
-
Steps:
- Step 1: Click the 'Check Eligibility' button.
-
Expected Result:
- After Step 1, the user is rejected because they have not finished the required steps.
-
Steps:
-
Test Case: Verify that a child user cannot claim the airdrop if it is not available.
-
Steps:
- Step 2: Click 'Claim Airdrop'.
-
Expected Result:
- After Step 2, the user is rejected because the airdrop is not available.
-
Steps:
-
Test Case: Verify that a child user cannot generate a promotion code if they have not finished the required steps.
-
Steps:
- Step 4: Click 'Generate Promotion Code'.
-
Expected Result:
- After Step 4, the user is rejected because they have not finished the required steps.
-
Steps:
Not tested.