testcases

This commit is contained in:
2026-03-06 17:19:12 +05:30
parent b43e28e09d
commit 91cedf54c9
22 changed files with 1100 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
# --- Mobile App Development ---
.PHONY: mobile-install mobile-info mobile-analyze mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build mobile-hot-reload mobile-hot-restart test-e2e test-e2e-setup test-e2e-client test-e2e-staff test-e2e-client-happy-path test-e2e-staff-happy-path test-e2e-staff-auth test-e2e-staff-navigation test-e2e-staff-profile test-e2e-staff-profile-extended test-e2e-staff-shifts test-e2e-staff-compliance test-e2e-staff-home test-e2e-staff-sign-out test-e2e-client-auth test-e2e-client-navigation test-e2e-client-orders test-e2e-client-settings test-e2e-client-sign-out
.PHONY: mobile-install mobile-info mobile-analyze mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build mobile-hot-reload mobile-hot-restart test-e2e test-e2e-setup test-e2e-client test-e2e-staff test-e2e-client-smoke test-e2e-staff-smoke test-e2e-client-hubs-e2e test-e2e-client-billing-smoke test-e2e-client-reports-smoke test-e2e-client-settings-e2e test-e2e-client-orders-smoke test-e2e-client-orders-data test-e2e-staff-profile-smoke test-e2e-staff-payments-smoke test-e2e-staff-shifts-smoke test-e2e-staff-compliance-e2e test-e2e-client-happy-path test-e2e-staff-happy-path test-e2e-staff-auth test-e2e-staff-navigation test-e2e-staff-profile test-e2e-staff-profile-extended test-e2e-staff-shifts test-e2e-staff-compliance test-e2e-staff-home test-e2e-staff-sign-out test-e2e-client-auth test-e2e-client-navigation test-e2e-client-orders test-e2e-client-settings test-e2e-client-sign-out
MOBILE_DIR := apps/mobile
@@ -141,6 +141,67 @@ test-e2e-client-sign-out: test-e2e-setup
apps/mobile/apps/client/maestro/auth/sign_out.yaml \
-e TEST_CLIENT_EMAIL="$${TEST_CLIENT_EMAIL}" -e TEST_CLIENT_PASSWORD="$${TEST_CLIENT_PASSWORD}"
# Client smoke (deterministic, minimal data dependencies)
test-e2e-client-smoke: test-e2e-setup
@echo "--> Running Client E2E smoke suite (deterministic)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/client/maestro/auth/sign_in.yaml \
apps/mobile/apps/client/maestro/home/tab_bar_roundtrip.yaml \
apps/mobile/apps/client/maestro/home/home_dashboard_widgets.yaml \
apps/mobile/apps/client/maestro/orders/create_order_entry.yaml \
apps/mobile/apps/client/maestro/settings/settings_page.yaml \
apps/mobile/apps/client/maestro/settings/logout_flow.yaml \
-e TEST_CLIENT_EMAIL="$${TEST_CLIENT_EMAIL}" -e TEST_CLIENT_PASSWORD="$${TEST_CLIENT_PASSWORD}"
# Client Hubs E2E (manage + create/edit/delete)
test-e2e-client-hubs-e2e: test-e2e-setup
@echo "--> Running Client E2E hubs suite (manage, edit, delete)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/client/maestro/auth/sign_in.yaml \
apps/mobile/apps/client/maestro/hubs/manage_hubs_from_settings.yaml \
apps/mobile/apps/client/maestro/hubs/edit_hub_e2e.yaml \
apps/mobile/apps/client/maestro/hubs/delete_hub_e2e.yaml \
-e TEST_CLIENT_EMAIL="$${TEST_CLIENT_EMAIL}" -e TEST_CLIENT_PASSWORD="$${TEST_CLIENT_PASSWORD}"
# Client Billing smoke (overview + invoice details/empty state)
test-e2e-client-billing-smoke: test-e2e-setup
@echo "--> Running Client E2E billing smoke suite..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/client/maestro/auth/sign_in.yaml \
apps/mobile/apps/client/maestro/billing/billing_overview.yaml \
apps/mobile/apps/client/maestro/billing/invoice_details_smoke.yaml \
-e TEST_CLIENT_EMAIL="$${TEST_CLIENT_EMAIL}" -e TEST_CLIENT_PASSWORD="$${TEST_CLIENT_PASSWORD}"
# Client Reports smoke (dashboard + export placeholder)
test-e2e-client-reports-smoke: test-e2e-setup
@echo "--> Running Client E2E reports smoke suite..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/client/maestro/auth/sign_in.yaml \
apps/mobile/apps/client/maestro/reports/reports_dashboard.yaml \
apps/mobile/apps/client/maestro/reports/spend_report_export_smoke.yaml \
-e TEST_CLIENT_EMAIL="$${TEST_CLIENT_EMAIL}" -e TEST_CLIENT_PASSWORD="$${TEST_CLIENT_PASSWORD}"
# Client Settings E2E (settings + edit profile save + logout)
test-e2e-client-settings-e2e: test-e2e-setup
@echo "--> Running Client E2E settings suite (edit profile + logout)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/client/maestro/auth/sign_in.yaml \
apps/mobile/apps/client/maestro/settings/settings_page.yaml \
apps/mobile/apps/client/maestro/settings/edit_profile_save_e2e.yaml \
apps/mobile/apps/client/maestro/settings/logout_flow.yaml \
-e TEST_CLIENT_EMAIL="$${TEST_CLIENT_EMAIL}" -e TEST_CLIENT_PASSWORD="$${TEST_CLIENT_PASSWORD}"
# Client Orders (smoke): Rapid + parsed draft navigation
test-e2e-client-orders-smoke: test-e2e-setup
@echo "--> Running Client E2E orders smoke suite (RAPID → One-Time draft)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/client/maestro/auth/sign_in.yaml \
apps/mobile/apps/client/maestro/orders/create_order_entry.yaml \
apps/mobile/apps/client/maestro/orders/create_order_rapid.yaml \
apps/mobile/apps/client/maestro/orders/rapid_to_one_time_draft_submit_e2e.yaml \
-e TEST_CLIENT_EMAIL="$${TEST_CLIENT_EMAIL}" -e TEST_CLIENT_PASSWORD="$${TEST_CLIENT_PASSWORD}"
# Client Orders (data-dependent): requires an active order
test-e2e-client-orders-data: test-e2e-setup
@echo "--> Running Client E2E orders data-dependent suite (edit active order)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/client/maestro/auth/sign_in.yaml \
apps/mobile/apps/client/maestro/orders/edit_active_order_verify_updated_e2e.yaml \
-e TEST_CLIENT_EMAIL="$${TEST_CLIENT_EMAIL}" -e TEST_CLIENT_PASSWORD="$${TEST_CLIENT_PASSWORD}"
# Client happy path (auth + hubs + create order E2E + billing + reports + logout) — #572
test-e2e-client-happy-path: test-e2e-setup
@echo "--> Running Client E2E happy path (hubs, order, billing, reports, logout)..."
@@ -209,6 +270,51 @@ test-e2e-staff-sign-out: test-e2e-setup
apps/mobile/apps/staff/maestro/auth/sign_out.yaml \
-e TEST_STAFF_PHONE="$${TEST_STAFF_PHONE}" -e TEST_STAFF_OTP="$${TEST_STAFF_OTP}"
# Staff smoke (deterministic, avoids shift/time/location and upload dependencies)
test-e2e-staff-smoke: test-e2e-setup
@echo "--> Running Staff E2E smoke suite (deterministic)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
apps/mobile/apps/staff/maestro/navigation/home.yaml \
apps/mobile/apps/staff/maestro/navigation/shifts.yaml \
apps/mobile/apps/staff/maestro/navigation/payments.yaml \
apps/mobile/apps/staff/maestro/navigation/profile.yaml \
apps/mobile/apps/staff/maestro/profile/personal_info.yaml \
apps/mobile/apps/staff/maestro/home/benefits.yaml \
apps/mobile/apps/staff/maestro/auth/sign_out.yaml \
-e TEST_STAFF_PHONE="$${TEST_STAFF_PHONE}" -e TEST_STAFF_OTP="$${TEST_STAFF_OTP}"
# Staff Profile smoke (details pages)
test-e2e-staff-profile-smoke: test-e2e-setup
@echo "--> Running Staff E2E profile smoke suite (timecard, bank, tax forms, attire validation)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
apps/mobile/apps/staff/maestro/profile/time_card_detail_smoke.yaml \
apps/mobile/apps/staff/maestro/profile/bank_account_fields_smoke.yaml \
apps/mobile/apps/staff/maestro/profile/tax_forms_smoke.yaml \
apps/mobile/apps/staff/maestro/profile/attire_validation_e2e.yaml \
-e TEST_STAFF_PHONE="$${TEST_STAFF_PHONE}" -e TEST_STAFF_OTP="$${TEST_STAFF_OTP}"
# Staff Payments smoke (earnings history)
test-e2e-staff-payments-smoke: test-e2e-setup
@echo "--> Running Staff E2E payments smoke suite..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
apps/mobile/apps/staff/maestro/payments/payment_history_smoke.yaml \
-e TEST_STAFF_PHONE="$${TEST_STAFF_PHONE}" -e TEST_STAFF_OTP="$${TEST_STAFF_OTP}"
# Staff Shifts smoke (open Find Shifts; optionally apply)
test-e2e-staff-shifts-smoke: test-e2e-setup
@echo "--> Running Staff E2E shifts smoke suite..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
apps/mobile/apps/staff/maestro/shifts/find_shifts_apply_smoke.yaml \
-e TEST_STAFF_PHONE="$${TEST_STAFF_PHONE}" -e TEST_STAFF_OTP="$${TEST_STAFF_OTP}"
# Staff Compliance E2E (document + certificate uploads)
test-e2e-staff-compliance-e2e: test-e2e-setup
@echo "--> Running Staff E2E compliance suite (document + certificate upload)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
apps/mobile/apps/staff/maestro/compliance/document_upload_e2e.yaml \
apps/mobile/apps/staff/maestro/compliance/certificate_upload_e2e.yaml \
-e TEST_STAFF_PHONE="$${TEST_STAFF_PHONE}" -e TEST_STAFF_OTP="$${TEST_STAFF_OTP}"
test-e2e-staff-shifts: test-e2e-setup
@echo "--> Running Staff E2E shifts (sign_in first, then shifts flows)..."
@maestro test $(MAESTRO_SHARDS) apps/mobile/apps/staff/maestro/auth/sign_in.yaml \