- Fix saveWiFiPassword to use encrypted passwords map instead of decrypted - Fix getWiFiPassword to decrypt from encrypted storage - Fix test expectations for migration and encryption functions - Remove unused error variables to fix linting warnings - All 27 tests now passing with proper encryption/decryption flow The WiFi credentials cache feature was already implemented but had bugs where encrypted and decrypted password maps were being mixed. This commit ensures proper encryption is maintained throughout the storage lifecycle.
194 lines
3.8 KiB
YAML
194 lines
3.8 KiB
YAML
appId: com.wellnuo.app
|
|
---
|
|
# WellNuo Full E2E Test
|
|
# Complete user journey from registration to dashboard
|
|
|
|
# --- STEP 0: Launch App with Fresh State ---
|
|
- launchApp:
|
|
clearState: true
|
|
|
|
# Wait for app to fully load
|
|
- extendedWaitUntil:
|
|
visible: ".*[Ww]elcome.*|.*[Ss]ign.*|.*[Ll]ogin.*|.*[Ee]mail.*"
|
|
timeout: 15000
|
|
|
|
- takeScreenshot: "01-app-launched"
|
|
|
|
# --- STEP 1: Enter Email ---
|
|
# Tap on email input area (center of screen where input is)
|
|
- tapOn:
|
|
text: ".*email.*|.*Email.*"
|
|
optional: true
|
|
|
|
# If no email field found, tap in center-ish area
|
|
- tapOn:
|
|
point: "50%,40%"
|
|
optional: true
|
|
|
|
- inputText: "${EMAIL}"
|
|
|
|
- hideKeyboard
|
|
|
|
- takeScreenshot: "02-email-entered"
|
|
|
|
# Tap Continue/Submit button
|
|
- tapOn:
|
|
text: ".*[Cc]ontinue.*|.*[Ss]ubmit.*|.*[Nn]ext.*"
|
|
|
|
# Wait for OTP screen
|
|
- extendedWaitUntil:
|
|
visible: ".*[Vv]erif.*|.*[Cc]ode.*|.*OTP.*|.*[Cc]heck.*email.*"
|
|
timeout: 15000
|
|
|
|
- takeScreenshot: "03-otp-screen"
|
|
|
|
# --- STEP 2: Enter OTP ---
|
|
- inputText: "${OTP_CODE}"
|
|
|
|
# Wait for name screen or dashboard
|
|
- extendedWaitUntil:
|
|
visible: ".*[Nn]ame.*|.*[Dd]ashboard.*|.*[Bb]eneficiar.*"
|
|
timeout: 15000
|
|
|
|
- takeScreenshot: "04-after-otp"
|
|
|
|
# --- STEP 3: Enter Name (if shown) ---
|
|
- assertVisible:
|
|
text: ".*[Ww]hat.*name.*"
|
|
optional: true
|
|
|
|
# Try to find and fill first name
|
|
- tapOn:
|
|
text: ".*[Ff]irst.*[Nn]ame.*"
|
|
optional: true
|
|
|
|
- inputText: "Test"
|
|
|
|
- hideKeyboard
|
|
|
|
# Try to find and fill last name
|
|
- tapOn:
|
|
text: ".*[Ll]ast.*[Nn]ame.*"
|
|
optional: true
|
|
|
|
- inputText: "User"
|
|
|
|
- hideKeyboard
|
|
|
|
- takeScreenshot: "05-name-entered"
|
|
|
|
# Tap Continue
|
|
- tapOn:
|
|
text: ".*[Cc]ontinue.*"
|
|
optional: true
|
|
|
|
# Wait for Add Loved One screen
|
|
- extendedWaitUntil:
|
|
visible: ".*[Aa]dd.*[Ll]oved.*|.*[Bb]eneficiar.*|.*[Dd]ashboard.*"
|
|
timeout: 10000
|
|
|
|
- takeScreenshot: "06-after-name"
|
|
|
|
# --- STEP 4: Add Beneficiary ---
|
|
- assertVisible:
|
|
text: ".*[Aa]dd.*[Ll]oved.*"
|
|
optional: true
|
|
|
|
# Find and fill name field
|
|
- tapOn:
|
|
text: ".*[Nn]ame.*"
|
|
optional: true
|
|
|
|
- inputText: "Grandma"
|
|
|
|
- hideKeyboard
|
|
|
|
- takeScreenshot: "07-beneficiary-entered"
|
|
|
|
# Tap Continue
|
|
- tapOn:
|
|
text: ".*[Cc]ontinue.*"
|
|
optional: true
|
|
|
|
# Wait for Get Started (Purchase) screen
|
|
- extendedWaitUntil:
|
|
visible: ".*[Gg]et.*[Ss]tarted.*|.*[Pp]urchase.*|.*[Ss]ensor.*"
|
|
timeout: 10000
|
|
|
|
- takeScreenshot: "08-purchase-screen"
|
|
|
|
# --- STEP 5: Choose "I already have sensors" ---
|
|
- swipe:
|
|
direction: UP
|
|
duration: 500
|
|
|
|
- tapOn:
|
|
text: ".*already.*sensor.*"
|
|
optional: true
|
|
|
|
# Wait for Connect Sensors screen
|
|
- extendedWaitUntil:
|
|
visible: ".*[Cc]onnect.*[Ss]ensor.*|.*[Aa]ctivate.*|.*[Dd]emo.*"
|
|
timeout: 10000
|
|
|
|
- takeScreenshot: "09-connect-sensors"
|
|
|
|
# --- STEP 6: Use Demo Code ---
|
|
- tapOn:
|
|
text: ".*[Dd]emo.*code.*"
|
|
optional: true
|
|
|
|
# Wait for demo code to be filled
|
|
- extendedWaitUntil:
|
|
visible: ".*DEMO.*|.*demo.*"
|
|
timeout: 5000
|
|
|
|
- tapOn:
|
|
text: ".*[Aa]ctivate.*"
|
|
optional: true
|
|
|
|
# Wait for success
|
|
- extendedWaitUntil:
|
|
visible: ".*[Ss]ensor.*[Cc]onnected.*|.*[Ss]uccess.*|.*[Dd]ashboard.*"
|
|
timeout: 15000
|
|
|
|
- takeScreenshot: "10-sensors-connected"
|
|
|
|
# --- STEP 7: Go to Dashboard ---
|
|
- tapOn:
|
|
text: ".*[Gg]o.*[Dd]ashboard.*|.*[Cc]ontinue.*"
|
|
optional: true
|
|
|
|
# Wait for Dashboard
|
|
- extendedWaitUntil:
|
|
visible: ".*[Mm]y.*[Ll]oved.*|.*[Gg]randma.*|.*[Dd]ashboard.*"
|
|
timeout: 15000
|
|
|
|
- takeScreenshot: "11-dashboard"
|
|
|
|
# --- STEP 8: Verify Dashboard ---
|
|
- assertVisible:
|
|
text: ".*[Gg]randma.*"
|
|
optional: true
|
|
|
|
# Test navigation tabs
|
|
- tapOn:
|
|
text: ".*[Cc]hat.*"
|
|
optional: true
|
|
- takeScreenshot: "12-chat-tab"
|
|
|
|
- tapOn:
|
|
text: ".*[Vv]oice.*"
|
|
optional: true
|
|
- takeScreenshot: "13-voice-tab"
|
|
|
|
- tapOn:
|
|
text: ".*[Pp]rofile.*"
|
|
optional: true
|
|
- takeScreenshot: "14-profile-tab"
|
|
|
|
- tapOn:
|
|
text: ".*[Bb]eneficiar.*"
|
|
optional: true
|
|
- takeScreenshot: "15-test-complete"
|