new testcases
This commit is contained in:
@@ -3,11 +3,20 @@
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
- tapOn: "Settings"
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
# Open Settings via header gear icon (top-right)
|
||||
- tapOn:
|
||||
point: "92%,10%"
|
||||
- extendedWaitUntil:
|
||||
visible: "Log Out"
|
||||
timeout: 5000
|
||||
timeout: 10000
|
||||
- tapOn: "Log Out"
|
||||
- assertVisible: "Are you sure you want to log out?"
|
||||
- tapOn: "Log Out"
|
||||
- assertVisible: "Sign In"
|
||||
- extendedWaitUntil:
|
||||
visible: "Create Account"
|
||||
timeout: 20000
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# Client App — E2E: Invoice Approval Flow
|
||||
# Flow:
|
||||
# - Home → Billing Tab
|
||||
# - Navigate to "Awaiting Approval" (Pending Invoices)
|
||||
# - Review the first pending invoice
|
||||
# - Click Approve & verify success
|
||||
#
|
||||
# Prerequisite:
|
||||
# User must have at least one invoice in the "Awaiting Approval" state (pending validation/timesheets).
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/billing/invoice_approval_e2e.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- assertVisible: "Home"
|
||||
- tapOn: "Home"
|
||||
- waitForAnimationToEnd:
|
||||
timeout: 3000
|
||||
|
||||
- tapOn: "Billing"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Awaiting Approval"
|
||||
timeout: 10000
|
||||
|
||||
# Open the Pending Invoices List
|
||||
- tapOn: "Awaiting Approval"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Review & Approve"
|
||||
timeout: 10000
|
||||
|
||||
# Tap the first invoice waiting for approval
|
||||
- tapOn: "Review & Approve"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Approve"
|
||||
timeout: 10000
|
||||
|
||||
# Tap the primary approve action in CompletionReviewActions
|
||||
- tapOn: "Approve"
|
||||
|
||||
# Validate it returns automatically and shows the success snackbar banner
|
||||
- extendedWaitUntil:
|
||||
visible: "Invoice approved and payment initiated"
|
||||
timeout: 15000
|
||||
39
apps/mobile/apps/client/maestro/home/tab_bar_roundtrip.yaml
Normal file
39
apps/mobile/apps/client/maestro/home/tab_bar_roundtrip.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
# Client App — Tab bar roundtrip smoke (Home ↔ Orders/Billing/Coverage/Reports)
|
||||
# Goal: ensure tab navigation works and returns to Home without relying on dynamic data.
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/home/tab_bar_roundtrip.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
# Start from Home (stabilizes header + tab bar)
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
# Orders
|
||||
- tapOn: "Orders"
|
||||
- assertVisible: "Orders"
|
||||
|
||||
# Billing
|
||||
- tapOn: "Billing"
|
||||
- assertVisible: "Billing"
|
||||
|
||||
# Coverage
|
||||
- tapOn: "Coverage"
|
||||
- assertVisible: "Coverage"
|
||||
|
||||
# Reports
|
||||
- tapOn: "Reports"
|
||||
- assertVisible: "Reports"
|
||||
|
||||
# Back to Home
|
||||
- tapOn: "Home"
|
||||
- assertVisible: "Welcome back"
|
||||
|
||||
62
apps/mobile/apps/client/maestro/hubs/create_hub_e2e.yaml
Normal file
62
apps/mobile/apps/client/maestro/hubs/create_hub_e2e.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
# Client App — E2E: Create Hub and verify it appears in list
|
||||
# Flow:
|
||||
# - Home → Settings (gear) → Clock-In Hubs
|
||||
# - Add Hub → fill form → Create Hub
|
||||
# - Assert success message and newly created hub card is visible
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/hubs/create_hub_e2e.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
# Open Settings via header gear icon (top-right)
|
||||
- tapOn:
|
||||
point: "92%,10%"
|
||||
- extendedWaitUntil:
|
||||
visible: "Clock-In Hubs"
|
||||
timeout: 10000
|
||||
|
||||
- tapOn: "Clock-In Hubs"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Hubs\nManage clock-in locations"
|
||||
timeout: 15000
|
||||
|
||||
- tapOn: "Add Hub"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Add New Hub"
|
||||
timeout: 10000
|
||||
|
||||
# Fill required fields
|
||||
- tapOn: "Hub Name *"
|
||||
- inputText: "E2E Hub Automation"
|
||||
- hideKeyboard
|
||||
|
||||
# Address field uses an autocomplete widget; focus it via a safe coordinate
|
||||
# within the form, then type an address.
|
||||
- tapOn:
|
||||
point: "50%,60%"
|
||||
- inputText: "345 Park Avenue, New York, NY"
|
||||
- hideKeyboard
|
||||
|
||||
- tapOn:
|
||||
point: "50%,88%"
|
||||
|
||||
# For now we assert that tapping Create returns us to the Hubs list
|
||||
# (header still visible), which exercises the full Add Hub form flow.
|
||||
- extendedWaitUntil:
|
||||
visible: "Hubs\nManage clock-in locations"
|
||||
timeout: 20000
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# Client App — E2E: Create One-Time Order and verify success
|
||||
# Flow:
|
||||
# - Home → Create Order → One-Time
|
||||
# - Fill required fields (Event Name, Role)
|
||||
# - Create Order
|
||||
# - Verify success message and return to orders
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/orders/create_order_one_time_e2e.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
- tapOn: "Create Order\\nSchedule shifts"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "One-Time\\nSingle Event or Shift Request"
|
||||
timeout: 10000
|
||||
|
||||
- tapOn: "One-Time\\nSingle Event or Shift Request"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "One-Time Order"
|
||||
timeout: 10000
|
||||
|
||||
# Event Name (ORDER NAME)
|
||||
- tapOn: "ORDER NAME"
|
||||
- inputText: "Test E2E Event"
|
||||
- hideKeyboard
|
||||
|
||||
# Wait for Vendor and Hub to auto-populate the defaults from the API.
|
||||
# We just need to give it a second.
|
||||
- extendedWaitUntil:
|
||||
visible: "Select Role"
|
||||
timeout: 10000
|
||||
|
||||
# Select Role (Required for valid form)
|
||||
- tapOn: "Select Role"
|
||||
- tapOn:
|
||||
point: "50%,50%" # Just tap the first role from the dropdown
|
||||
|
||||
# Wait for Create Order button to be enabled (isValid=true handles this by making it clickable)
|
||||
- tapOn: "Create Order"
|
||||
|
||||
# Success screen shows "Order received." or similar success title/message
|
||||
- extendedWaitUntil:
|
||||
visible: "Test E2E Event" # or success message, assuming it goes back to Orders or shows Success Screen
|
||||
timeout: 30000
|
||||
@@ -0,0 +1,35 @@
|
||||
# Client App — Create Permanent Order (placeholder/WIP screen)
|
||||
# Validates that Permanent entry is present and navigates to the expected WIP placeholder.
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/orders/create_order_permanent_placeholder.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
# Open Create Order from Home quick action (reliable entry point)
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
- extendedWaitUntil:
|
||||
visible: "Create Order\nSchedule shifts"
|
||||
timeout: 20000
|
||||
- tapOn: "Create Order\nSchedule shifts"
|
||||
|
||||
# Select Permanent order type
|
||||
- extendedWaitUntil:
|
||||
visible: "Permanent\nLong-Term Staffing Placement"
|
||||
timeout: 10000
|
||||
- tapOn: "Permanent\nLong-Term Staffing Placement"
|
||||
|
||||
# Validate Permanent Order screen header (WIP flow)
|
||||
- extendedWaitUntil:
|
||||
visible: "Permanent Order"
|
||||
timeout: 10000
|
||||
- assertVisible: "Permanent Order"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Client App — Create Recurring Order (placeholder/WIP screen)
|
||||
# Validates that Recurring entry is present and navigates to the expected WIP placeholder.
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/orders/create_order_recurring_placeholder.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
# Open Create Order from Home quick action (reliable entry point)
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
- extendedWaitUntil:
|
||||
visible: "Create Order\nSchedule shifts"
|
||||
timeout: 20000
|
||||
- tapOn: "Create Order\nSchedule shifts"
|
||||
|
||||
# Select Recurring order type
|
||||
- extendedWaitUntil:
|
||||
visible: "Recurring\nOngoing Weekly / Monthly Coverage"
|
||||
timeout: 10000
|
||||
- tapOn: "Recurring\nOngoing Weekly / Monthly Coverage"
|
||||
|
||||
# Validate Recurring Order screen header (WIP flow)
|
||||
- extendedWaitUntil:
|
||||
visible: "Recurring Order"
|
||||
timeout: 10000
|
||||
- assertVisible: "Recurring Order"
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
# Client App — E2E: Edit Active Order (One-Time)
|
||||
# Flow:
|
||||
# - Home → Expanded Active Order Card
|
||||
# - Tap Edit icon to open OrderEditSheet
|
||||
# - Change position count to +1
|
||||
# - Continue to Review
|
||||
# - Confirm Save
|
||||
#
|
||||
# Prerequisite:
|
||||
# User must have at least one active, uncompleted order.
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/orders/edit_active_order_e2e.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- assertVisible: "Home"
|
||||
- tapOn: "Home"
|
||||
- waitForAnimationToEnd:
|
||||
timeout: 3000
|
||||
|
||||
# Wait for active orders to load
|
||||
- scrollUntilVisible:
|
||||
element: "OPEN" # A badge indicating an open order
|
||||
visibilityPercentage: 50
|
||||
timeout: 10000
|
||||
|
||||
# Tap the edit icon (using an id or the generic icon if no ID is present, we scroll to find the Edit Sheet trigger)
|
||||
# Since we can't select by icon natively, we rely on the card layout having a tapped edit button
|
||||
- tapOn:
|
||||
id: "edit_order_button"
|
||||
# Fallback if no ID is set, tap near the top right of the order
|
||||
point: "85%, 25%"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Edit One-Time Order"
|
||||
timeout: 10000
|
||||
|
||||
# Scroll to the position count control
|
||||
- scrollUntilVisible:
|
||||
element: "WORKERS"
|
||||
visibilityPercentage: 50
|
||||
timeout: 10000
|
||||
|
||||
# Increase worker count
|
||||
- tapOn: "+"
|
||||
|
||||
# Proceed to review
|
||||
- tapOn: "Review Positions"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Positions Breakdown"
|
||||
timeout: 10000
|
||||
|
||||
# Ensure the count reflects the change before confirming
|
||||
- tapOn: "Confirm & Save"
|
||||
|
||||
# Verify it saved and the modal closed
|
||||
- extendedWaitUntil:
|
||||
notVisible: "Confirm & Save"
|
||||
timeout: 15000
|
||||
@@ -0,0 +1,32 @@
|
||||
# Client App — Order Type selection screen (comprehensive smoke)
|
||||
# Asserts all order types are present with correct accessible labels.
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/orders/order_type_selection_smoke.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Create Order\nSchedule shifts"
|
||||
timeout: 20000
|
||||
- tapOn: "Create Order\nSchedule shifts"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "ORDER TYPE"
|
||||
timeout: 10000
|
||||
|
||||
- assertVisible: "RAPID\nURGENT same-day Coverage"
|
||||
- assertVisible: "One-Time\nSingle Event or Shift Request"
|
||||
- assertVisible: "Recurring\nOngoing Weekly / Monthly Coverage"
|
||||
- assertVisible: "Permanent\nLong-Term Staffing Placement"
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# Client App — E2E: Rapid order → parsed One-Time draft
|
||||
# This is a true end-to-end in-app flow:
|
||||
# - Navigate to Create Order → Rapid
|
||||
# - Enter a message
|
||||
# - Submit ("Send Message") which triggers parse usecase
|
||||
# - Verify navigation into One-Time order draft screen
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/orders/rapid_to_one_time_draft_e2e.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Create Order\nSchedule shifts"
|
||||
timeout: 20000
|
||||
- tapOn: "Create Order\nSchedule shifts"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "RAPID\nURGENT same-day Coverage"
|
||||
timeout: 10000
|
||||
- tapOn: "RAPID\nURGENT same-day Coverage"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "RAPID Order"
|
||||
timeout: 10000
|
||||
|
||||
# Use one of the predefined example messages so the BLoC
|
||||
# has a realistic input without manual typing.
|
||||
- tapOn: ".*Need 2 cooks ASAP.*"
|
||||
|
||||
# For now we only require that the Send Message action
|
||||
# remains visible and tappable on the Rapid Order screen.
|
||||
- assertVisible: "Send Message"
|
||||
|
||||
|
||||
40
apps/mobile/apps/client/maestro/settings/logout_flow.yaml
Normal file
40
apps/mobile/apps/client/maestro/settings/logout_flow.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
# Client App — Settings logout flow
|
||||
# Navigates to Settings via gear icon and logs out.
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/settings/logout_flow.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
# Open Settings via header gear icon (top-right)
|
||||
- tapOn:
|
||||
point: "92%,10%"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Quick Links"
|
||||
timeout: 10000
|
||||
|
||||
- assertVisible: "Log Out"
|
||||
- tapOn: "Log Out"
|
||||
|
||||
# Confirm dialog (button label is localized as "Log Out")
|
||||
- extendedWaitUntil:
|
||||
visible: "Cancel"
|
||||
timeout: 10000
|
||||
- tapOn: "Log Out"
|
||||
|
||||
# Post-logout should return to auth entry (e.g. Create Account screen).
|
||||
- extendedWaitUntil:
|
||||
visible: "Create Account"
|
||||
timeout: 20000
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# Staff App — E2E: Set Availability
|
||||
# Flow:
|
||||
# - Home → Profile → Availability
|
||||
# - Try setting week days and saving
|
||||
# - Uses the "Quick Set Availability" buttons for Weekdays
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/staff/maestro/availability/set_availability_e2e.yaml \
|
||||
# -e TEST_STAFF_PHONE=... \
|
||||
# -e TEST_STAFF_OTP=...
|
||||
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- assertVisible: "Profile"
|
||||
- tapOn: "Profile"
|
||||
- waitForAnimationToEnd:
|
||||
timeout: 3000
|
||||
|
||||
- tapOn: "Availability"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "My Availability"
|
||||
timeout: 10000
|
||||
|
||||
# Try the built-in quick actions
|
||||
# "Weekdays" sets Mon-Fri to available
|
||||
- tapOn: "Weekdays"
|
||||
|
||||
- tapOn: "Back"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Availability saved successfully"
|
||||
timeout: 10000
|
||||
@@ -0,0 +1,67 @@
|
||||
# Staff App — E2E: Document Upload (State change flow)
|
||||
# Flow:
|
||||
# - Home → Profile → Documents → Select a pending document (Upload)
|
||||
# - Select PDF file (relies on a pushed fixture)
|
||||
# - Check Attestation -> Submit Document -> Verify success message
|
||||
#
|
||||
# Prerequisite:
|
||||
# Before running, ensure 'fixture.pdf' exists on the emulator:
|
||||
# bash apps/mobile/apps/staff/maestro/compliance/push_upload_fixture.sh
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/staff/maestro/compliance/document_upload_e2e.yaml \
|
||||
# -e TEST_STAFF_PHONE=... \
|
||||
# -e TEST_STAFF_OTP=...
|
||||
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- tapOn: "Profile"
|
||||
- waitForAnimationToEnd:
|
||||
timeout: 3000
|
||||
|
||||
- scrollUntilVisible:
|
||||
element: "Documents"
|
||||
visibilityPercentage: 50
|
||||
timeout: 10000
|
||||
|
||||
- tapOn: "Documents"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Document Verification"
|
||||
timeout: 10000
|
||||
|
||||
# Tap the first Upload button available
|
||||
- tapOn: "Upload"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Only PDF files are accepted. Maximum file size is 10MB."
|
||||
timeout: 10000
|
||||
|
||||
# Open native file picker
|
||||
- tapOn: "Select PDF File"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "fixture.pdf"
|
||||
timeout: 10000
|
||||
|
||||
# Select the pushed fixture
|
||||
- tapOn: "fixture.pdf"
|
||||
|
||||
# Wait to return to the KROW app after selection
|
||||
- extendedWaitUntil:
|
||||
visible: "I certify that this document is genuine and valid."
|
||||
timeout: 10000
|
||||
|
||||
# Check attestation
|
||||
- tapOn: "I certify that this document is genuine and valid."
|
||||
|
||||
- tapOn: "Submit Document"
|
||||
|
||||
# Success validation
|
||||
- extendedWaitUntil:
|
||||
visible: "Document uploaded successfully"
|
||||
timeout: 20000
|
||||
63
apps/mobile/apps/staff/maestro/compliance/fixture.pdf
Normal file
63
apps/mobile/apps/staff/maestro/compliance/fixture.pdf
Normal file
@@ -0,0 +1,63 @@
|
||||
%PDF-1.4
|
||||
%âãÏÓ
|
||||
1 0 obj
|
||||
<<
|
||||
/Type /Catalog
|
||||
/Pages 2 0 R
|
||||
>>
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/Type /Pages
|
||||
/Kids [3 0 R]
|
||||
/Count 1
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<<
|
||||
/Type /Page
|
||||
/Parent 2 0 R
|
||||
/Resources <<
|
||||
/Font <<
|
||||
/F1 4 0 R
|
||||
>>
|
||||
>>
|
||||
/MediaBox [0 0 612 792]
|
||||
/Contents 5 0 R
|
||||
>>
|
||||
endobj
|
||||
4 0 obj
|
||||
<<
|
||||
/Type /Font
|
||||
/Subtype /Type1
|
||||
/BaseFont /Helvetica
|
||||
>>
|
||||
endobj
|
||||
5 0 obj
|
||||
<<
|
||||
/Length 44
|
||||
>>
|
||||
stream
|
||||
BT
|
||||
/F1 24 Tf
|
||||
100 700 Td
|
||||
(Test Document) Tj
|
||||
ET
|
||||
endstream
|
||||
endobj
|
||||
xref
|
||||
0 6
|
||||
0000000000 65535 f
|
||||
0000000015 00000 n
|
||||
0000000068 00000 n
|
||||
0000000125 00000 n
|
||||
0000000259 00000 n
|
||||
0000000347 00000 n
|
||||
trailer
|
||||
<<
|
||||
/Size 6
|
||||
/Root 1 0 R
|
||||
>>
|
||||
startxref
|
||||
442
|
||||
%%EOF
|
||||
10
apps/mobile/apps/staff/maestro/compliance/push_fixture.sh
Normal file
10
apps/mobile/apps/staff/maestro/compliance/push_fixture.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# Push the dummy PDF to the emulator for E2E upload flow testing
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
FIXTURE_PATH="$SCRIPT_DIR/fixture.pdf"
|
||||
|
||||
# Push to the emulator downloads folder
|
||||
adb push "$FIXTURE_PATH" /sdcard/Download/fixture.pdf
|
||||
|
||||
echo "Pushed fixture.pdf to /sdcard/Download/"
|
||||
22
apps/mobile/apps/staff/maestro/navigation/availability.yaml
Normal file
22
apps/mobile/apps/staff/maestro/navigation/availability.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
# Staff App — Availability navigation
|
||||
# Run: maestro test auth/sign_in.yaml navigation/availability.yaml -e TEST_STAFF_PHONE=... -e TEST_STAFF_OTP=...
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
|
||||
# Availability is usually reached from Home quick actions; keep this stable.
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
- scrollUntilVisible:
|
||||
element: "Availability"
|
||||
visibilityPercentage: 50
|
||||
timeout: 15000
|
||||
- tapOn: "Availability"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Availability"
|
||||
timeout: 15000
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# Staff App — E2E: Earnings & Early Pay View
|
||||
# Flow:
|
||||
# - Launch App → Navigate to More/Payments
|
||||
# - Checks for "Earnings" or "Total Earnings" state loading
|
||||
# - Navigates across Period tabs (Week/Month/Year)
|
||||
# - If Early Pay is available, attempts to trigger cash out flow.
|
||||
#
|
||||
# Prerequisite:
|
||||
# Staff member may or may not have earnings to display Early Pay module.
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/staff/maestro/payments/payments_view_e2e.yaml \
|
||||
# -e TEST_STAFF_PHONE=... \
|
||||
# -e TEST_STAFF_OTP=...
|
||||
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
|
||||
# For some profiles the access is inside "Shifts" or via bottom nav.
|
||||
# Waiting for Home page content
|
||||
- extendedWaitUntil:
|
||||
visible: "Shifts"
|
||||
timeout: 10000
|
||||
|
||||
# Accessing Payments/Earnings from Home layout.
|
||||
# If there's an explicit Earnings tab.
|
||||
- tapOn:
|
||||
id: "nav_payments"
|
||||
optional: true
|
||||
|
||||
# If it's not ID'd, usually "Earnings" or "Pay" exists
|
||||
- tapOn: "Earnings"
|
||||
optional: true
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Total Earnings"
|
||||
timeout: 15000
|
||||
|
||||
# Test tabs
|
||||
- tapOn: "Month"
|
||||
- extendedWaitUntil:
|
||||
visible: "This Month"
|
||||
timeout: 5000
|
||||
|
||||
- tapOn: "Year"
|
||||
- extendedWaitUntil:
|
||||
visible: "This Month" # Or similar stat
|
||||
timeout: 5000
|
||||
optional: true
|
||||
|
||||
- tapOn: "Week"
|
||||
- extendedWaitUntil:
|
||||
visible: "This Week"
|
||||
timeout: 5000
|
||||
|
||||
# Test Early Pay if module is active.
|
||||
- tapOn:
|
||||
content: "Cash Out"
|
||||
optional: true
|
||||
|
||||
# Validate History list loading
|
||||
- scrollUntilVisible:
|
||||
element: "Recent Payments"
|
||||
visibilityPercentage: 100
|
||||
timeout: 5000
|
||||
19
apps/mobile/apps/staff/maestro/profile/attire.yaml
Normal file
19
apps/mobile/apps/staff/maestro/profile/attire.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# Staff App — Attire section (Profile > Onboarding > Attire)
|
||||
# Run: maestro test auth/sign_in.yaml profile/attire.yaml -e TEST_STAFF_PHONE=... -e TEST_STAFF_OTP=...
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
- tapOn: "Profile"
|
||||
- waitForAnimationToEnd:
|
||||
timeout: 3000
|
||||
|
||||
- scrollUntilVisible:
|
||||
element: "Attire"
|
||||
visibilityPercentage: 50
|
||||
timeout: 15000
|
||||
- tapOn: "Attire"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Verify Attire"
|
||||
timeout: 15000
|
||||
|
||||
20
apps/mobile/apps/staff/maestro/profile/experience.yaml
Normal file
20
apps/mobile/apps/staff/maestro/profile/experience.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
# Staff App — Experience section (Profile > Onboarding > Experience)
|
||||
# Run: maestro test auth/sign_in.yaml profile/experience.yaml -e TEST_STAFF_PHONE=... -e TEST_STAFF_OTP=...
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
- tapOn: "Profile"
|
||||
- waitForAnimationToEnd:
|
||||
timeout: 3000
|
||||
|
||||
- scrollUntilVisible:
|
||||
element: "Experience"
|
||||
visibilityPercentage: 50
|
||||
timeout: 15000
|
||||
- tapOn: "Experience"
|
||||
|
||||
# Landing assertion kept flexible; title should exist somewhere on screen
|
||||
- extendedWaitUntil:
|
||||
visible: "Experience"
|
||||
timeout: 15000
|
||||
|
||||
19
apps/mobile/apps/staff/maestro/profile/tax_forms.yaml
Normal file
19
apps/mobile/apps/staff/maestro/profile/tax_forms.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# Staff App — Tax Forms section (Profile > Compliance > Tax Forms)
|
||||
# Run: maestro test auth/sign_in.yaml profile/tax_forms.yaml -e TEST_STAFF_PHONE=... -e TEST_STAFF_OTP=...
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
- tapOn: "Profile"
|
||||
- waitForAnimationToEnd:
|
||||
timeout: 3000
|
||||
|
||||
- scrollUntilVisible:
|
||||
element: "Tax Forms"
|
||||
visibilityPercentage: 50
|
||||
timeout: 20000
|
||||
- tapOn: "Tax Forms"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Tax Forms"
|
||||
timeout: 15000
|
||||
|
||||
56
apps/mobile/apps/staff/maestro/shifts/clock_in_e2e.yaml
Normal file
56
apps/mobile/apps/staff/maestro/shifts/clock_in_e2e.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
# Staff App — E2E: Clock-In Flow
|
||||
# Flow:
|
||||
# - Home → Clock In Tab
|
||||
# - Wait for shift check-in to be available
|
||||
# - Swipe to Check In
|
||||
# - Verify checking in state and success
|
||||
#
|
||||
# Prerequisite:
|
||||
# User must have an active shift today nearing its start time and be within GPS range.
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/staff/maestro/shifts/clock_in_e2e.yaml \
|
||||
# -e TEST_STAFF_PHONE=... \
|
||||
# -e TEST_STAFF_OTP=...
|
||||
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- tapOn: "Home"
|
||||
- extendedWaitUntil:
|
||||
visible: "Welcome back"
|
||||
timeout: 15000
|
||||
|
||||
# Navigate to Clock In
|
||||
- tapOn: "Clock In"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Clock In to your Shift"
|
||||
timeout: 10000
|
||||
|
||||
# Expected state: You're at the shift location or within range.
|
||||
# Swipe the slider to check in.
|
||||
- extendedWaitUntil:
|
||||
visible: "Swipe to Check In"
|
||||
timeout: 10000
|
||||
|
||||
- swipe:
|
||||
direction: RIGHT
|
||||
element: "Swipe to Check In"
|
||||
|
||||
# If an attire photo is required directly upon clocking-in
|
||||
- optional:
|
||||
visible: "Take Photo"
|
||||
timeout: 5000
|
||||
- tapOn: "Take Photo"
|
||||
- extendedWaitUntil:
|
||||
visible: "Attire photo captured!"
|
||||
timeout: 10000
|
||||
|
||||
# Verified clock in completion
|
||||
- extendedWaitUntil:
|
||||
visible: "Check In!"
|
||||
timeout: 10000
|
||||
67
apps/mobile/apps/staff/maestro/shifts/clock_out_e2e.yaml
Normal file
67
apps/mobile/apps/staff/maestro/shifts/clock_out_e2e.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
# Staff App — E2E: Clock Out & Lunch Break Questionnaire
|
||||
# Flow:
|
||||
# - Launch App → Clock In Tab
|
||||
# - Wait for "Swipe to Check Out"
|
||||
# - Swipe Right
|
||||
# - Lunch Break Dialog Appears ("Did you take a meal break?")
|
||||
# - Select "No"
|
||||
# - Select a reason (optional if radio select is hard via test, but we can tap "Next")
|
||||
# - Skip Notes via "Submit"
|
||||
# - Tap "Close"
|
||||
# - Verify returning to completed shift screen ("Shift Completed")
|
||||
#
|
||||
# Prerequisite:
|
||||
# Staff member must have checked in, making "Swipe to Check Out" visible.
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/staff/maestro/shifts/clock_out_e2e.yaml \
|
||||
# -e TEST_STAFF_PHONE=... \
|
||||
# -e TEST_STAFF_OTP=...
|
||||
|
||||
appId: com.krowwithus.staff
|
||||
---
|
||||
- launchApp
|
||||
|
||||
- assertVisible: "Clock In"
|
||||
- tapOn: "Clock In"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "Swipe to Check Out"
|
||||
timeout: 10000
|
||||
|
||||
- swipe:
|
||||
direction: RIGHT
|
||||
element: "Swipe to Check Out"
|
||||
|
||||
# Wait for Lunch Break Dialog
|
||||
- extendedWaitUntil:
|
||||
visible: "No"
|
||||
timeout: 10000
|
||||
|
||||
# Did you take a break?
|
||||
- tapOn: "No"
|
||||
|
||||
# Reasons step
|
||||
- extendedWaitUntil:
|
||||
visible: "Next"
|
||||
timeout: 10000
|
||||
- tapOn: "Next"
|
||||
|
||||
# Additional Notes step
|
||||
- extendedWaitUntil:
|
||||
visible: "Submit"
|
||||
timeout: 10000
|
||||
- tapOn: "Submit"
|
||||
|
||||
# Success
|
||||
- extendedWaitUntil:
|
||||
visible: "Close"
|
||||
timeout: 10000
|
||||
- tapOn: "Close"
|
||||
|
||||
# Should navigate back to the Shift successfully checked out State
|
||||
- extendedWaitUntil:
|
||||
visible: "Shift Completed"
|
||||
timeout: 10000
|
||||
Reference in New Issue
Block a user