freshyo/docs/test-cases/customer-authentication.md
2026-10-11 18:21:24 +05:30

3.3 KiB

Customer authentication

Scope: user.auth, login/registration screens, login walls and auth context on native/web. Password journeys are active; do not trigger real OTP/SMS tests without separate approval. Fixtures: U0/U1/U2 and disposable accounts; see shared rules.

Happy paths

ID Priority Action / input Expected result
AUTH-01 P0 Password-login with each supported mobile/email identifier. Correct account/session; no OTP sent; private APIs become available.
AUTH-02 P0 Register valid disposable user, sign out, sign in. Exactly one complete account; supported credentials work.
AUTH-03 P1 Login from Cart, Me and protected checkout links. Returns to correct allowed destination; cart/query context retained.
AUTH-04 P1 Browse catalog/search signed out; open Cart and Me. Public browsing works; login walls do not block other tabs.
AUTH-05 P1 Cold-start with valid persisted session, then logout. Session restored; logout removes private state and access.

Validation and boundaries

ID Priority Action / input Expected result
AUTH-06 P0 Wrong password, unknown user, empty/malformed identifier. Safe authentication failure; no token/session or private data.
AUTH-07 P1 Missing fields, unacceptable password, invalid mobile/email, unchecked required terms. Specific validation; no partial registration; correction succeeds.
AUTH-08 P1 Duplicate email/mobile; case/space variations. Agreed normalization/uniqueness; no duplicate identity.
AUTH-09 P1 Unicode name, punctuation, long identifier/password, leading/trailing spaces. Agreed limits applied consistently; no crash or silent truncation.
AUTH-10 P0 Tampered, expired, malformed JWT and absent authorization. Private requests rejected; UI recovers to authentication.
AUTH-11 P0 Customer supplies staff/superadmin claims or token to wrong auth endpoint. No role escalation or cross-identity session.

Lifecycle, security and recovery

ID Priority Action / input Expected result
AUTH-12 P0 Logout U1, login U2 without clearing storage. No U1 addresses/orders/coupons/selected checkout state exposed to U2.
AUTH-13 P1 Login request delayed, double tap, navigate away, background app. No duplicate submit/session race or permanent spinner.
AUTH-14 P1 Offline, timeout, 401/500 during login, then retry. Accurate error; no false authenticated state; retry succeeds.
AUTH-15 P0 Malicious external or privileged return URL. Navigation stays within allowed customer destinations.
AUTH-16 P1 Register two concurrent requests for same identifier. One identity; rejected request leaves no orphan detail/credential row.
AUTH-17 P2 Browser refresh/back and native keyboard/secure password entry. Correct route, focus, masking and password accessibility.
AUTH-18 P2 OTP endpoints in approved isolated harness only: invalid/expired/reused code. If enabled, no bypass/replay; otherwise mark conditional, not a password-flow prerequisite.

Apply the README result-recording rules to every table section; cases are NOT RUN.

Conditional SMS/verification coverage is expanded in OTP authentication; it is not part of the default password suite.