User Story
- By Rajesh Elumalai- As a Admin / Super Admin
- I want to add a new vendor to the system.
- So that i can track my electronics product purchase and selling details.
Basic Vendor Information Need to be collected
- Name
- Representative
- GST Number
- Mobile Phone
- Alternate Phone (Optional)
- Whatsapp Number
REST API
- https://api.electrocis.technocis.in/v1/vendor
- Method: POST
JSON Structure
[
{
"id": "string",
"createdAt": "2024-07-29T16:21:56.611Z",
"updatedAt": "2024-07-29T16:21:56.611Z",
"name": "string",
"gstin": "string",
"address": "string",
"phone": "string",
"whatsapp": "string",
"alternatePhone": "string",
"representative": "string",
"notes": "string"
}
]
Vendor Creation Test Cases
Test Case 1: Successful Vendor Creation
- Test Case ID: TC_001
- Title: Verify that a vendor can be successfully created with all required fields filled.
- Precondition: User is logged in and has permission to create a vendor.
- Test Steps:
- Navigate to the "Create Vendor" page.
- Enter a valid Vendor Name.
- Enter a valid Representative name.
- Enter a valid Vendor GST Number.
- Enter a valid Mobile Phone number.
- (Optional) Enter a valid Alternate Phone number.
- Enter a valid WhatsApp Number.
- Click "Submit."
- Expected Result: Vendor is successfully created, and a confirmation message is displayed.
Test Case 2: Missing Required Fields
- Test Case ID: TC_002
- Title: Verify that the system prevents vendor creation when required fields are missing.
- Precondition: User is logged in and has permission to create a vendor.
- Test Steps:
- Navigate to the "Create Vendor" page.
- Leave one or more required fields (Vendor Name, Representative, Vendor GST Number, Mobile Phone, WhatsApp Number) blank.
- Click "Submit."
- Expected Result: The system displays an error message indicating which required fields are missing and prevents vendor creation.
Test Case 3: Invalid GST Number Format
- Test Case ID: TC_003
- Title: Verify that the system validates the GST Number format.
- Precondition: User is logged in and has permission to create a vendor.
- Test Steps:
- Navigate to the "Create Vendor" page.
- Enter an invalid GST Number (e.g., incorrect format).
- Fill in the remaining fields with valid data.
- Click "Submit."
- Expected Result: The system displays an error message indicating that the GST Number is invalid and prevents vendor creation.
Test Case 4: Invalid Mobile Phone Number Format
- Test Case ID: TC_004
- Title: Verify that the system validates the Mobile Phone number format.
- Precondition: User is logged in and has permission to create a vendor.
- Test Steps:
- Navigate to the "Create Vendor" page.
- Enter an invalid Mobile Phone number (e.g., fewer than 10 digits, contains letters).
- Fill in the remaining fields with valid data.
- Click "Submit."
- Expected Result: The system displays an error message indicating that the Mobile Phone number is invalid and prevents vendor creation.
Test Case 5: Optional Alternate Phone Field
- Test Case ID: TC_005
- Title: Verify that the system allows vendor creation without entering an Alternate Phone number.
- Precondition: User is logged in and has permission to create a vendor.
- Test Steps:
- Navigate to the "Create Vendor" page.
- Leave the Alternate Phone field blank.
- Fill in the remaining fields with valid data.
- Click "Submit."
- Expected Result: Vendor is successfully created without an Alternate Phone number, and a confirmation message is displayed.
Test Case 6: Duplicate Vendor Name
- Test Case ID: TC_006
- Title: Verify that the system prevents the creation of a vendor with a duplicate Vendor Name.
- Precondition: User is logged in and has permission to create a vendor.
- Test Steps:
- Navigate to the "Create Vendor" page.
- Enter a Vendor Name that already exists in the system.
- Fill in the remaining fields with valid data.
- Click "Submit."
- Expected Result: The system displays an error message indicating that the Vendor Name already exists and prevents vendor creation.
Test Case 7: Invalid WhatsApp Number Format
- Test Case ID: TC_007
- Title: Verify that the system validates the WhatsApp Number format.
- Precondition: User is logged in and has permission to create a vendor.
- Test Steps:
- Navigate to the "Create Vendor" page.
- Enter an invalid WhatsApp Number (e.g., fewer than 10 digits, contains letters).
- Fill in the remaining fields with valid data.
- Click "Submit."
- Expected Result: The system displays an error message indicating that the WhatsApp Number is invalid and prevents vendor creation.
Test Case 8: Maximum Character Limits
- Test Case ID: TC_008
- Title: Verify that the system enforces maximum character limits for text fields.
- Precondition: User is logged in and has permission to create a vendor.
- Test Steps:
- Navigate to the "Create Vendor" page.
- Enter a Vendor Name, Representative name, and GST Number that exceed the maximum character limit.
- Fill in the remaining fields with valid data.
- Click "Submit."
- Expected Result: The system displays an error message indicating the character limit for each field and prevents vendor creation.
Development ETA (40 mins)
- By Developer - Jayasurya Subramani-
Form design
-
validation
-
api Integration
-
notifications
-
Test cases