# 02 – Registration (customer & carrier)

Pages: `/customer_reg?custcod=<company code>` and `/carrier_reg?custcod=<company code>` (links a company gives to its customers/carriers). Tested with the QA company link (`custcod=NzE5`).

## Works fine

- Both pages open and look correct. A missing or wrong company code shows "404 NOT FOUND".
- Required fields are what you asked for – **Customer:** Name, Email, Password, Confirm Password, Phone, Terms. **Carrier:** Company name, Email, Password, Confirm Password, Phone, Terms. Country, State, City, Address are optional.
- Country → State → City lists load (India: 38 states; first state: 19 cities).
- Live messages "Please enter a valid email" and "Passwords do not match" appear. Show/hide password eye works. "Login" link goes to the login page.

## Issues

| # | Sev | What the user experiences | Steps | Evidence |
|---|-----|---------------------------|-------|----------|
| R1 | **High** | **"Email/phone already used" checks never work** for visitors – the page asks the server and the server answers *401 (not allowed)*: `/checkk-email`, `/checkk-phone`, `/get-admins-by-country/…`. The user gets no warning while typing. | Open the link → type email / phone (browser network shows 401) | `screens/reg_customer_filled_bad.png` |
| R2 | **High** | **Sign Up without the captcha shows a technical message**: *"The g-recaptcha-response field is required."* The page reloads; the Terms tick is cleared (typed text is kept). Customers don't know what to do. Console also shows `captchaToken is not defined` and `toastr is not defined`. | Fill form → Sign Up without ticking "I'm not a robot" | `screens/reg_customer_submit_nocaptcha.png`, `screens/reg_carrier_submit.png` |
| R3 | Medium | **"Terms & Conditions" link does nothing** – the page never loads the script needed to open the window, so users cannot read the terms they must accept. | Click "Terms & Conditions" | `screens/reg_terms_click.png` |
| R4 | Medium | On the customer page the pop-up messages (toasts) can never appear: `toastr is not defined` error as soon as the page opens. | Open customer link, look at browser console | – |
| R5 | Low | A very short phone number (e.g. "12") gets no message on the page. | Type 12 in Phone | `screens/reg_customer_filled_bad.png` |
| R6 | Low | The "admin by country" list stays empty (hidden) because of R1. | – | – |

## Not tested (and why)

- **A successful registration** – Google reCAPTCHA cannot be solved by an automated browser. So not verified: account creation, auto-login after sign-up, welcome/confirmation email, duplicate email handling on submit, whether the new customer/carrier can log in, and whether any approval is needed.
