Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ Each command runs the tests in `tests/shared/` and its target namespace under
`tests/`. Narrow a run with `--tags`:

```bash
dev swift e2e --tags cart
dev swift e2e --tags checkout
dev rn e2e ios --tags checkout
dev android e2e --tags cart,checkout
dev android e2e --tags launch,checkout
```

Both options match **any** listed tag, because that is how Maestro filters.
`--tags cart,checkout` runs the cart tests and the checkout tests. `--exclude-tags`
skips tests carrying any listed tag. `config.yaml` quarantines `flaky` and `wip`
for every run, so those need no command line option.
`--tags launch,checkout` runs the launch tests and the checkout tests.
`--exclude-tags` skips tests carrying any listed tag. `config.yaml` quarantines
`flaky` and `wip` for every run, so those need no command line option.

### Tags

Expand Down Expand Up @@ -146,8 +146,8 @@ ruby e2e/scripts/e2e_matrix_to_browserstack_run_plan count
- `tests/shared/` holds the tests every target runs through the CI matrix.
Comment thread
kieran-osgood-shopify marked this conversation as resolved.
- `tests/<platform>/` holds platform-local tests. The matrix may ignore their tags.
- `tests/shared/launch-smoke.yaml` is the shared launch smoke test.
Comment thread
kieran-osgood-shopify marked this conversation as resolved.
- `tests/shared/cart-from-control-link.yaml` seeds a cart through the control link
and waits for the cart marker.
- `tests/shared/checkout-present-and-close.yaml` seeds a cart through the control
link, presents checkout, closes it, and asserts dismissal.
- `tests/react-native/checkout-guest.yaml` composes the React Native guest
checkout smoke test from those subflows.
- `tests/react-native/checkout-hardcoded-buyer-identity.yaml` verifies checkout
Expand Down
6 changes: 5 additions & 1 deletion e2e/config/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ tests_path: tests
tags:
include:
- launch
- cart
- checkout
exclude:
- flaky
- wip
# The remaining `full` tests place a real order and live under tests/react-native/,
# so they cannot run on the Swift and Kotlin rows. Drop this entry when the shared
# ordering tests replace them.
- full
applications:
- id: react-native-ios
target: react-native
Expand Down
6 changes: 6 additions & 0 deletions e2e/flows/checkout/assert-dismissed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
appId: ${E2E_APP_ID}
---
- extendedWaitUntil:
notVisible:
id: "shopify_checkout_kit_close_button"
timeout: 30000
16 changes: 1 addition & 15 deletions e2e/flows/checkout/assert-returned-to-empty-cart.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
appId: ${E2E_APP_ID}
---
# RN E2E runs against released native SDK artifacts. Android 4.0.0-alpha.2
# still exposes checkoutKitCloseBtn; #333 normalized the source id to
# shopify_checkout_kit_close_button. When RN nativeSdkVersions point at native
# SDK releases containing #333, replace this platform split with that id.
- runFlow:
Comment thread
kieran-osgood-shopify marked this conversation as resolved.
when:
platform: android
commands:
- tapOn:
id: checkoutKitCloseBtn
- runFlow:
when:
platform: ios
commands:
- tapOn: "Close"
- runFlow: close.yaml

- extendedWaitUntil:
visible:
Expand Down
5 changes: 5 additions & 0 deletions e2e/flows/checkout/close.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
appId: ${E2E_APP_ID}
---
- tapOn:
id: "shopify_checkout_kit_close_button"
- waitForAnimationToEnd
6 changes: 3 additions & 3 deletions e2e/test/e2e_matrix_to_browserstack_run_plan_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def test_runs_carry_default_tags_and_the_other_platform_exclusion
ios_run = run_for("swift-ios")
android_run = run_for("kotlin-android")

assert_equal ["launch", "cart"], ios_run.fetch("include_tags")
assert_equal ["flaky", "wip", "android-only"], ios_run.fetch("exclude_tags")
assert_equal ["flaky", "wip", "ios-only"], android_run.fetch("exclude_tags")
assert_equal ["launch", "checkout"], ios_run.fetch("include_tags")
assert_equal ["flaky", "wip", "full", "android-only"], ios_run.fetch("exclude_tags")
assert_equal ["flaky", "wip", "full", "ios-only"], android_run.fetch("exclude_tags")
end

def test_an_application_overrides_the_default_tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ appId: ${E2E_APP_ID}
name: React Native checkout - hardcoded buyer identity
tags:
- checkout
- smoke
# This test submits a real order, so it belongs to the expensive tier.
- full

env:
# Sample app buyer identity configuration
Expand Down
11 changes: 0 additions & 11 deletions e2e/tests/shared/cart-from-control-link.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions e2e/tests/shared/checkout-present-and-close.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
appId: ${E2E_APP_ID}
name: Present checkout and close it
tags:
- checkout
- smoke

env:
# No buyerIdentityMode: this test asserts presentation and dismissal, not identity.
E2E_CART_PARAMS: "productIndex=0&quantity=1"
---
- runFlow: ../../flows/app/bootstrap-cart-from-link.yaml
- runFlow: ../../flows/checkout/present.yaml
- runFlow: ../../flows/checkout/close.yaml
# The four targets return to different screens, so this test asserts dismissal only.
# The tests that place an order assert what the cart holds afterwards.
- runFlow: ../../flows/checkout/assert-dismissed.yaml
Loading