diff --git a/bitrise.yml b/bitrise.yml index 5cd56153380..d4c034a0b91 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -181,60 +181,6 @@ workflows: inputs: - event_description: Android E2E tests failing! $BITRISE_BUILD_URL - integration_key: $AUX_PAGERDUTY_INTEGRATION_KEY - maestro-paymentsheet: - before_run: - - start_emulator - - prepare_all - after_run: - - conclude_all - steps: - - wait-for-android-emulator@1: - inputs: - - boot_timeout: 600 - - script@1: - title: Execute Maestro tests - inputs: - - content: |- - #!/usr/bin/env bash - bash ./scripts/execute_maestro_elements_tests.sh paymentsheet - - slack@3: - is_always_run: true - run_if: .IsBuildFailed - inputs: - - webhook_url: $WEBHOOK_SLACK_ELEMENTS_MAESTRO - - webhook_url_on_error: $WEBHOOK_SLACK_ELEMENTS_MAESTRO - - custom-test-results-export@1: - inputs: - - search_pattern: '*/maestroReport.xml' - - test_name: Maestro tests - - deploy-to-bitrise-io@2: { } - maestro-customersheet: - before_run: - - start_emulator - - prepare_all - after_run: - - conclude_all - steps: - - wait-for-android-emulator@1: - inputs: - - boot_timeout: 600 - - script@1: - title: Execute Maestro tests - inputs: - - content: |- - #!/usr/bin/env bash - bash ./scripts/execute_maestro_elements_tests.sh customersheet - - slack@3: - is_always_run: true - run_if: .IsBuildFailed - inputs: - - webhook_url: $WEBHOOK_SLACK_ELEMENTS_MAESTRO - - webhook_url_on_error: $WEBHOOK_SLACK_ELEMENTS_MAESTRO - - custom-test-results-export@1: - inputs: - - search_pattern: '*/maestroReport.xml' - - test_name: Maestro tests - - deploy-to-bitrise-io@2: { } run-instrumentation-tests: before_run: - start_emulator diff --git a/maestro/customersheet/NewCustomer-Card.yaml b/maestro/customersheet/NewCustomer-Card.yaml deleted file mode 100644 index 8d5d82d8bf2..00000000000 --- a/maestro/customersheet/NewCustomer-Card.yaml +++ /dev/null @@ -1,47 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -- launchApp -- startRecording: /tmp/test_results/newcustomer-card -# Android specific: Navigate to example -- scrollUntilVisible: - element: "CustomerSheet Playground" -- waitForAnimationToEnd: - timeout: 5000 -- tapOn: "CustomerSheet Playground" -- waitForAnimationToEnd: - timeout: 5000 -- extendedWaitUntil: - visible: "Selected payment method" - timeout: 60000 -# Use a new customer -- tapOn: - id: "CUSTOMER_SHEET_PLAYGROUND_EXISTING_CUSTOMER" -- extendedWaitUntil: - visible: "Select" - timeout: 60000 -- tapOn: "Select" -- extendedWaitUntil: - visible: - text: "Manage your payment methods" - optional: true - timeout: 60000 -- tapOn: - id: "AddCard" - optional: true -- extendedWaitUntil: - visible: "Save a new payment method" - timeout: 60000 -# ENTER CARD DETAILS -- runFlow: - file: ./card/subflow-card-details.yaml - env: - CARD_NUMBER: 4242424242424242 -- hideKeyboard -- tapOn: "Save" -- waitForAnimationToEnd: - timeout: 5000 -- assertVisible: - id: "PAYMENT_OPTION_CARD_TEST_TAG_···· 4242" -- tapOn: "Confirm" -- assertVisible: "···· 4242" -- stopRecording diff --git a/maestro/customersheet/card/subflow-card-details.yaml b/maestro/customersheet/card/subflow-card-details.yaml deleted file mode 100644 index 90acd1a2719..00000000000 --- a/maestro/customersheet/card/subflow-card-details.yaml +++ /dev/null @@ -1,13 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -####### Enter card details ####### -- tapOn: "Card number" -- inputText: ${CARD_NUMBER} -- tapOn: "MM / YY" -- inputText: "444" -- tapOn: "CVC" -- inputText: "444" -- tapOn: "Country or region" -- tapOn: "\U0001f1fa\U0001f1f8 United States" -- tapOn: "ZIP code" -- inputText: "44444" diff --git a/maestro/paymentsheet/FlowController-Deferred-PaymentIntent-Card.yaml b/maestro/paymentsheet/FlowController-Deferred-PaymentIntent-Card.yaml deleted file mode 100644 index c93689e4994..00000000000 --- a/maestro/paymentsheet/FlowController-Deferred-PaymentIntent-Card.yaml +++ /dev/null @@ -1,27 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -- launchApp -- startRecording: /tmp/test_results/flowcontroller-deferred-paymentintent-card -# Android specific: Navigate to example -- tapOn: "FlowController with server-side confirmation" -- waitForAnimationToEnd: - timeout: 5000 -- extendedWaitUntil: - visible: "Select" - timeout: 60000 -- tapOn: "Select" -- tapOn: - id: "AddCard" - optional: true -# ENTER CARD DETAILS -- runFlow: - file: ./card/subflow-card-details.yaml - env: - CARD_NUMBER: 4242424242424242 -- scroll -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/primary_button" -- tapOn: "Buy" -- assertVisible: ".*Success.*" -- tapOn: "Finish" -- stopRecording diff --git a/maestro/paymentsheet/FlowController-PaymentIntent-Card.yaml b/maestro/paymentsheet/FlowController-PaymentIntent-Card.yaml deleted file mode 100644 index 9a64fd23180..00000000000 --- a/maestro/paymentsheet/FlowController-PaymentIntent-Card.yaml +++ /dev/null @@ -1,25 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -- launchApp -- startRecording: /tmp/test_results/flowcontroller-paymentintent-card -# Android specific: Navigate to example -- tapOn: "FlowController" -- extendedWaitUntil: - visible: "Select" - timeout: 60000 -- tapOn: "Select" -- tapOn: - id: "AddCard" - optional: true -# ENTER CARD DETAILS -- runFlow: - file: ./card/subflow-card-details.yaml - env: - CARD_NUMBER: 4242424242424242 -- scroll -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/primary_button" -- tapOn: "Buy" -- assertVisible: ".*Success.*" -- tapOn: "Finish" -- stopRecording diff --git a/maestro/paymentsheet/PaymentSheet-Deferred-PaymentIntent-Card.yaml b/maestro/paymentsheet/PaymentSheet-Deferred-PaymentIntent-Card.yaml deleted file mode 100644 index 90a803f8678..00000000000 --- a/maestro/paymentsheet/PaymentSheet-Deferred-PaymentIntent-Card.yaml +++ /dev/null @@ -1,23 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -- launchApp -- startRecording: /tmp/test_results/paymentsheet-deferred-paymentintent-card -# Android specific: Navigate to example -- tapOn: "PaymentSheet with server-side confirmation" -- waitForAnimationToEnd: - timeout: 5000 -- tapOn: "Buy" -# ENTER CARD DETAILS -- extendedWaitUntil: - visible: "Card" - timeout: 60000 -- runFlow: - file: ./card/subflow-card-details.yaml - env: - CARD_NUMBER: 4242424242424242 -- scroll -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/primary_button" -- assertVisible: ".*Success.*" -- tapOn: "Finish" -- stopRecording diff --git a/maestro/paymentsheet/PaymentSheet-PaymentIntent-AddressElement-Card.yaml b/maestro/paymentsheet/PaymentSheet-PaymentIntent-AddressElement-Card.yaml deleted file mode 100644 index c575f5d9c1f..00000000000 --- a/maestro/paymentsheet/PaymentSheet-PaymentIntent-AddressElement-Card.yaml +++ /dev/null @@ -1,47 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -- launchApp -- startRecording: /tmp/test_results/paymentsheet-paymentintent-addresselement-card -- scroll -# Android specific: Navigate to example -- waitForAnimationToEnd: - timeout: 5000 -- scrollUntilVisible: - element: "Playground" -- tapOn: "Playground" -- scrollUntilVisible: - element: - id: "com.stripe.android.paymentsheet.example:id/default_billing_off_button" -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/default_billing_off_button" -- scrollUntilVisible: - element: - id: "com.stripe.android.paymentsheet.example:id/reload_button" -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/reload_button" -- scrollUntilVisible: - element: - id: "com.stripe.android.paymentsheet.example:id/shipping_address_button" -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/shipping_address_button" -- waitForAnimationToEnd: - timeout: 5000 -- tapOn: "Save address" -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/complete_checkout_button" -# ENTER CARD DETAILS -- extendedWaitUntil: - visible: "Card" - timeout: 60000 -- assertVisible: "Billing address is same as shipping" -- runFlow: - file: ./card/subflow-card-details.yaml - env: - CARD_NUMBER: 4242424242424242 -- scrollUntilVisible: - element: - id: "com.stripe.android.paymentsheet.example:id/primary_button" -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/primary_button" -- assertVisible: ".*Success.*" -- stopRecording diff --git a/maestro/paymentsheet/PaymentSheet-PaymentIntent-Card-3DS2.yaml b/maestro/paymentsheet/PaymentSheet-PaymentIntent-Card-3DS2.yaml deleted file mode 100644 index 88c115cfb4a..00000000000 --- a/maestro/paymentsheet/PaymentSheet-PaymentIntent-Card-3DS2.yaml +++ /dev/null @@ -1,37 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -- launchApp -- startRecording: /tmp/test_results/paymentsheet-paymentintent-card-3ds2 -# Android specific: Navigate to example -- tapOn: "PaymentSheet" -- waitForAnimationToEnd: - timeout: 5000 -- tapOn: "Buy" -# ENTER CARD DETAILS -- extendedWaitUntil: - visible: "Card" - timeout: 60000 -- runFlow: - file: ./card/subflow-card-details.yaml - env: - CARD_NUMBER: 4000000000003220 -- scroll -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/primary_button" -####### Bypass Chrome on-boarding screen ####### -- runFlow: - file: ../common/subflow-skip-chrome-welcome.yaml - env: - APP_ID: com.stripe.android.paymentsheet.example -############################################### -# AUTHORIZE -- extendedWaitUntil: - visible: "COMPLETE" - timeout: 60000 -- tapOn: "COMPLETE" -# CONFIRM AND COMPLETE -- extendedWaitUntil: - visible: ".*Success.*" - timeout: 60000 -- tapOn: "Finish" -- stopRecording diff --git a/maestro/paymentsheet/PaymentSheet-PaymentIntent-Card.yaml b/maestro/paymentsheet/PaymentSheet-PaymentIntent-Card.yaml deleted file mode 100644 index 1a88f228bd8..00000000000 --- a/maestro/paymentsheet/PaymentSheet-PaymentIntent-Card.yaml +++ /dev/null @@ -1,23 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -- launchApp -- startRecording: /tmp/test_results/paymentsheet-paymentintent-card -# Android specific: Navigate to example -- tapOn: "PaymentSheet" -- waitForAnimationToEnd: - timeout: 5000 -- tapOn: "Buy" -# ENTER CARD DETAILS -- extendedWaitUntil: - visible: "Card" - timeout: 60000 -- runFlow: - file: ./card/subflow-card-details.yaml - env: - CARD_NUMBER: 4242424242424242 -- scroll -- tapOn: - id: "com.stripe.android.paymentsheet.example:id/primary_button" -- assertVisible: ".*Success.*" -- tapOn: "Finish" -- stopRecording diff --git a/maestro/paymentsheet/card/subflow-card-details.yaml b/maestro/paymentsheet/card/subflow-card-details.yaml deleted file mode 100644 index c8aec75f454..00000000000 --- a/maestro/paymentsheet/card/subflow-card-details.yaml +++ /dev/null @@ -1,14 +0,0 @@ -appId: com.stripe.android.paymentsheet.example ---- -####### Enter card details ####### -- tapOn: "Card" -- tapOn: "Card number" -- inputText: ${CARD_NUMBER} -- tapOn: "MM / YY" -- inputText: "444" -- tapOn: "CVC" -- inputText: "444" -- tapOn: "Country or region" -- tapOn: "\U0001f1fa\U0001f1f8 United States" -- tapOn: "ZIP code" -- inputText: "44444" diff --git a/scripts/execute_maestro_elements_tests.sh b/scripts/execute_maestro_elements_tests.sh deleted file mode 100644 index 7ba1169aca2..00000000000 --- a/scripts/execute_maestro_elements_tests.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -set -o pipefail -set -x - -# Retry mechanism for Maestro installation -MAX_RETRIES=3 -RETRY_COUNT=0 - -# Get the first command line argument as the parameter, one of [customersheet, paymentsheet] -elementType=$1 - -now=$(date +%F_%H-%M-%S) -echo $now - -while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do - export MAESTRO_VERSION=1.30.4 - curl -Ls "https://get.maestro.mobile.dev" | bash - - if [ $? -eq 0 ]; then - # If successful, set PATH and break loop - export PATH="$PATH":"$HOME/.maestro/bin" - maestro -v - break - else - let RETRY_COUNT=RETRY_COUNT+1 - echo "Attempt $RETRY_COUNT failed. Retrying..." - sleep 5 - fi -done - -if [ $RETRY_COUNT -eq $MAX_RETRIES ]; then - echo "Failed to download and install Maestro after $MAX_RETRIES attempts." - exit 1 -fi - -# Create test results folder. -mkdir -p /tmp/test_results - -# Compile and install APK. -./gradlew :paymentsheet-example:installDebug - -# Clear and start collecting logs -maestro test --format junit --output maestroReport.xml maestro/$elementType