appId: ${ADMIN_APP_ID} env: ADMIN_APP_ID: ${ADMIN_APP_ID || "in.freshyo.adminui"} STAFF_NAME: ${STAFF_NAME || ""} STAFF_PASSWORD: ${STAFF_PASSWORD || ""} PRODUCT_NAME: ${PRODUCT_NAME || ""} EXPECT_VISIBLE: ${EXPECT_VISIBLE || "true"} tags: - region - products --- # Tests 5/6 (admin-ui side): the product list for STAFF_NAME's region shows # PRODUCT_NAME when EXPECT_VISIBLE=true (all-regions product) and hides it # when EXPECT_VISIBLE=false (another region's restricted product). - launchApp - runFlow: when: visible: id: login-name-input file: ../subflows/login.yaml - extendedWaitUntil: visible: text: '.*Manage product catalog.*' timeout: 20000 - tapOn: '.*Manage product catalog.*' - extendedWaitUntil: visible: text: 'Search products...' timeout: 15000 - tapOn: 'Search products...' - inputText: ${PRODUCT_NAME} - runFlow: when: true: ${EXPECT_VISIBLE == 'true'} commands: - extendedWaitUntil: visible: text: '.*${PRODUCT_NAME}.*' timeout: 15000 - runFlow: when: true: ${EXPECT_VISIBLE == 'false'} commands: - extendedWaitUntil: visible: text: 'No products match your filters' timeout: 15000