Create Vendor

PENDING 8 hrs Medium 2024-04-25

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

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:
    1. Navigate to the "Create Vendor" page.
    2. Enter a valid Vendor Name.
    3. Enter a valid Representative name.
    4. Enter a valid Vendor GST Number.
    5. Enter a valid Mobile Phone number.
    6. (Optional) Enter a valid Alternate Phone number.
    7. Enter a valid WhatsApp Number.
    8. 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:
    1. Navigate to the "Create Vendor" page.
    2. Leave one or more required fields (Vendor Name, Representative, Vendor GST Number, Mobile Phone, WhatsApp Number) blank.
    3. 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:
    1. Navigate to the "Create Vendor" page.
    2. Enter an invalid GST Number (e.g., incorrect format).
    3. Fill in the remaining fields with valid data.
    4. 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:
    1. Navigate to the "Create Vendor" page.
    2. Enter an invalid Mobile Phone number (e.g., fewer than 10 digits, contains letters).
    3. Fill in the remaining fields with valid data.
    4. 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:
    1. Navigate to the "Create Vendor" page.
    2. Leave the Alternate Phone field blank.
    3. Fill in the remaining fields with valid data.
    4. 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:
    1. Navigate to the "Create Vendor" page.
    2. Enter a Vendor Name that already exists in the system.
    3. Fill in the remaining fields with valid data.
    4. 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:
    1. Navigate to the "Create Vendor" page.
    2. Enter an invalid WhatsApp Number (e.g., fewer than 10 digits, contains letters).
    3. Fill in the remaining fields with valid data.
    4. 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:
    1. Navigate to the "Create Vendor" page.
    2. Enter a Vendor Name, Representative name, and GST Number that exceed the maximum character limit.
    3. Fill in the remaining fields with valid data.
    4. 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