# Staging End-to-End Test Checklist

Do not test against the production database first. Use a separate staging database and sample data.

## Setup
- [ ] Confirm Hosticare PHP version and required extensions.
- [ ] Install compatible Laravel framework and Composer dependencies.
- [ ] Configure staging `.env`, app key, database and mail/log settings.
- [ ] Run migrations and create the first admin with a strong password.
- [ ] Confirm `APP_DEBUG=false` before any public exposure.
- [ ] Confirm HTTPS, storage permissions and backups.

## Access and permissions
- [ ] Login success/failure, logout, session expiry and CSRF behavior.
- [ ] Admin can manage users; non-admin cannot elevate roles.
- [ ] Test every role against each admin page and direct URL.
- [ ] Verify inactive users cannot sign in.

## Website and mobile
- [ ] Test header navigation, search, product cards, cart open/close/remove/quantity.
- [ ] Test inquiry validation and WhatsApp click-to-chat message.
- [ ] Test at 320, 360, 390, 430, 768 and desktop widths.
- [ ] Check horizontal overflow, clipped buttons, keyboard focus and labels.
- [ ] Confirm WhatsApp numbers and links are valid; no WhatsApp API is assumed.

## Lab Records
- [ ] Verify actual source column headers and order against the original PDF/Excel.
- [ ] Verify multi-line rows, patient names, test names, amounts and blank values.
- [ ] Compare at least 20 sample rows (including multi-test and wrapped rows) against source.
- [ ] Stop import if any source value/column is missing, shifted or fabricated.
- [ ] Confirm duplicate-file protection and import failure rollback.
- [ ] Edit Lab Name, Collection By and Payment Collected; Save All; reload and confirm persisted.
- [ ] Confirm Save All updates existing imported row IDs, not creates new rows.
- [ ] Verify lab/date filters and lab-wise payment reports.
- [ ] Verify PDF and Excel exports, including original columns and three appended fields.

## Products, purchases and GST billing
- [ ] Create/update product, SKU uniqueness, price, GST and stock.
- [ ] Purchase entry increases stock exactly once.
- [ ] Invoice validates quantity and prevents negative stock.
- [ ] Verify discount, taxable value, GST and grand total with manual calculations.
- [ ] Confirm invoice save is atomic; stock movement and invoice item records match.
- [ ] Test duplicate submit/double click protection.
- [ ] Test hold bill, history, print and seller GST/address settings.
- [ ] Have accountant validate GST invoice/tax treatment before issuing real invoices.

## Final readiness
- [ ] Browser console and server logs have no unhandled errors.
- [ ] Test on Android Chrome and a desktop browser.
- [ ] Verify database backup and successful restore.
- [ ] Obtain user approval that live pages match the locked designs.
- [ ] Deploy only after all blockers are closed.
