# add-store: fill and submit the Add Store form (apps/admin-ui). # Form-only: begins on the Add Store screen - it is the orchestrator's job to # land there (launch/login/openLink freshyoadmin://dashboard/stores/add). # Text-only: no store image, no product selection (both optional in the form). # Args: STORE_NAME, STORE_DESCRIPTION, OWNER_NAME. # Run from the admin-ui folder or via runFlow from an orchestrator flow. appId: in.freshyo.adminui env: STORE_NAME: ${STORE_NAME || ""} STORE_DESCRIPTION: ${STORE_DESCRIPTION || ""} OWNER_NAME: ${OWNER_NAME || ""} --- - extendedWaitUntil: visible: id: store-name-input timeout: 30000 # focus-guaranteed tap (validates the field really got focus) - runFlow: file: subflows/tap-and-focus.yaml env: FIELD_ID: store-name-input - eraseText - inputText: ${STORE_NAME} - pressKey: Enter # focus-guaranteed tap (validates the field really got focus) - runFlow: file: subflows/tap-and-focus.yaml env: FIELD_ID: store-description-input - eraseText - inputText: ${STORE_DESCRIPTION} - pressKey: Enter # multiline field: Enter does NOT dismiss the keyboard - tap a static, # non-interactive heading instead so the keyboard cannot eat later taps - tapOn: text: 'Add New Store' - waitForAnimationToEnd - assertVisible: id: store-owner-dropdown - scrollUntilVisible: element: id: store-owner-dropdown direction: DOWN speed: 100 visibilityPercentage: 60 - waitForAnimationToEnd - assertVisible: id: store-owner-dropdown - tapOn: id: store-owner-dropdown - waitForAnimationToEnd # Select by id: BottomDropdown option testIDs embed the label slug # (store-owner-dropdown-option--). - scrollUntilVisible: element: id: 'store-owner-dropdown-option-.*${OWNER_NAME.toLowerCase().split(" ").join("-")}.*' direction: DOWN speed: 100 visibilityPercentage: 60 - waitForAnimationToEnd - tapOn: id: 'store-owner-dropdown-option-.*${OWNER_NAME.toLowerCase().split(" ").join("-")}.*' - extendedWaitUntil: notVisible: id: 'store-owner-dropdown-option-.*${OWNER_NAME.toLowerCase().split(" ").join("-")}.*' timeout: 10000 - waitForAnimationToEnd # centerElement dropped on purpose: with the button already visible it # re-nudges the scroll endlessly trying to center it. - scrollUntilVisible: element: id: store-submit-button direction: DOWN speed: 100 visibilityPercentage: 100 - waitForAnimationToEnd - waitForAnimationToEnd - assertVisible: id: store-submit-button - tapOn: id: store-submit-button - assertVisible: 'Store created successfully' - tapOn: OK