# Admin: create a delivery slot with a future date (no products yet — the # product is attached in admin-attach-product.yaml). # # The date/time pickers are native Android Material dialogs, so they are driven # through their resource-ids rather than text: # android:id/next next month # android:id/button1 OK (button2 = CANCEL) # android:id/toggle_mode switch the clock dialog to text entry # android:id/input_hour / input_minute the typed time fields # The clock dialog remembers its last mode, hence the `notVisible` guard. # # Env (see e2e/run.sh): ADMIN_NAME, ADMIN_PASSWORD, SLOT_DATE_DESC # SLOT_DATE_DESC = the 15th of next month, e.g. "15 October 2026" appId: in.freshyo.adminui --- - launchApp: clearState: false - runFlow: ../subflows/dismiss-dev-toast.yaml - runFlow: ../subflows/admin-login.yaml - extendedWaitUntil: visible: "Dashboard" timeout: 90000 # --- Slots list -> create form ---------------------------------------------- - tapOn: id: "delivery-slots-menu-item" - extendedWaitUntil: visible: id: "add-slot-fab" timeout: 40000 - runFlow: ../subflows/dismiss-dev-toast.yaml - tapOn: id: "add-slot-fab" - extendedWaitUntil: visible: "Create New Slot" timeout: 40000 # --- Delivery date & time --------------------------------------------------- - tapOn: id: "delivery-date-picker" - tapOn: id: "android:id/next" - tapOn: ${SLOT_DATE_DESC} - tapOn: id: "android:id/button1" - tapOn: id: "delivery-time-picker" - runFlow: when: notVisible: "Type in time" commands: - tapOn: id: "android:id/toggle_mode" - tapOn: id: "android:id/input_hour" - eraseText - inputText: "18" - tapOn: id: "android:id/input_minute" - eraseText - inputText: "00" - tapOn: id: "android:id/button1" # --- Freeze date & time (must be <= delivery) ------------------------------- - tapOn: id: "freeze-date-picker" - tapOn: id: "android:id/next" - tapOn: ${SLOT_DATE_DESC} - tapOn: id: "android:id/button1" - tapOn: id: "freeze-time-picker" - runFlow: when: notVisible: "Type in time" commands: - tapOn: id: "android:id/toggle_mode" - tapOn: id: "android:id/input_hour" - eraseText - inputText: "17" - tapOn: id: "android:id/input_minute" - eraseText - inputText: "00" - tapOn: id: "android:id/button1" # --- Submit ----------------------------------------------------------------- - runFlow: ../subflows/dismiss-dev-toast.yaml - tapOn: id: "create-slot-button" - extendedWaitUntil: visible: "Slot created successfully!" timeout: 40000 - tapOn: "OK" - extendedWaitUntil: visible: id: "add-slot-fab" timeout: 40000