# Basic-sanity post-admin assertions. # See tests/e2e/basic-sanity.md for full instructions and troubleshooting. # # Prerequisite: Expo Go is logged in as the test user and has address ADDRESS_ID. # # Run this AFTER tests/e2e/basic-sanity-admin-update.sh has: # - packaged both orders # - disabled flash delivery # - suspended the combo # - marked the 1kg SKU out of stock # - rebuilt the caches # # Required env: PRODUCT_NAME, COMBO_NAME, SKU_1KG, SKU_COMBO. appId: host.exp.Exponent name: basic-sanity-after-admin tags: - e2e - basic-sanity --- - stopApp - openLink: exp://127.0.0.1:8081 - extendedWaitUntil: visible: id: "location-address-name-${ADDRESS_ID}" timeout: 60000 optional: true - runFlow: when: visible: id: "location-address-name-${ADDRESS_ID}" commands: - tapOn: id: "location-address-name-${ADDRESS_ID}" - extendedWaitUntil: visible: id: "tab-home" timeout: 90000 - extendedWaitUntil: visible: id: "home-search" timeout: 60000 - waitForAnimationToEnd: timeout: 5000 # Both upcoming orders are packaged: the glimpse tracker shows the Packed dot. - extendedWaitUntil: visible: id: "next-order-glimpse" timeout: 30000 - assertVisible: id: "order-status-dot-packed" - assertNotVisible: text: "PLACED" # Flash delivery is off. - tapOn: id: "tab-flash" - extendedWaitUntil: visible: id: "flash-unavailable" timeout: 15000 # Suspended combo is no longer searchable. - tapOn: id: "tab-home" - tapOn: id: "home-search" - extendedWaitUntil: visible: id: "search-input" timeout: 20000 - tapOn: id: "search-input" - eraseText - inputText: "${COMBO_NAME}" - hideKeyboard # Search tokenises the run id, so the two A variants still match. The suspended # combo itself must be gone from the results. - extendedWaitUntil: visible: id: "product-card-${SKU_1KG}" timeout: 20000 - assertNotVisible: id: "product-card-${SKU_COMBO}" # The 1kg SKU is still searchable but flagged out of stock. - tapOn: id: "search-input" - eraseText - inputText: "${PRODUCT_NAME}" - hideKeyboard - extendedWaitUntil: visible: id: "product-card-${SKU_1KG}" timeout: 20000 - assertVisible: id: "out-of-stock-${SKU_1KG}"