Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests): end to end testing again #11428

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
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
165 changes: 110 additions & 55 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,56 @@ jobs:
- run:
name: Update rollout if needed
command: ./scripts/deploys/update-android-rollout-if-needed

run-e2e-tests:
environment:
BUNDLE_PATH: .vendor # path to install gems and use for caching

macos:
xcode: 16.2
resource_class: m2pro.medium

steps:
- attach_workspace:
at: ../workspace
- macos/preboot-simulator:
version: "18.2"
platform: "iOS"
device: "iPhone 16 Pro Max"
- macos/preboot-simulator:
version: "18.2"
platform: "iOS"
device: "iPhone 16 Pro"
- macos/preboot-simulator:
version: "18.2"
platform: "iOS"
device: "iPhone 16"
- run:
name: Install maestro
command: curl -Ls "https://get.maestro.mobile.dev" | bash
- run:
name: Test maestro install
command: maestro --version
- run:
name: Clear project dir
command: |
rm -rf /Users/distiller/project/*
- checkout
- setup-awscli
- run:
name: Download app zip
command: aws s3 cp s3://artsy-citadel/eigen/Artsy.zip ./Artsy.zip
- run:
name: Unzip the app
command: unzip Artsy.zip

- run:
name: Install app in booted sims
command: ./install_app_in_booted_sims.sh
- run:
name: Notify if license agreement needs to be signed
command: ./scripts/deploys/notify-if-new-license-agreement
name: Run maestro tests
no_output_timeout: 25m
command: maestro test --shard-split 3 e2e/

deploy-nightly-beta:
environment:
Expand Down Expand Up @@ -514,6 +561,14 @@ workflows:
- deploy-nightly-beta
- run-nightly-tasks

run-e2e:
jobs:
- run-e2e-tests:
filters:
branches:
only:
- brian/e2e-again

flag-check:
triggers:
- schedule:
Expand All @@ -540,56 +595,56 @@ workflows:
ignore:
- main

- check-code:
context: danger-github-oss

- check-and-deploy:
filters:
branches:
only:
- main

- test-js

- build-test-js

- horizon/block:
context: horizon
project_id: 37
filters:
branches:
only:
- beta-ios
- beta-android

- build-test-app-ios:
filters:
branches:
ignore:
- beta-android
requires:
- test-js
- check-code
- build-test-js
- horizon/block

- build-test-app-android:
filters:
branches:
ignore:
- beta-ios
requires:
- test-js
- check-code
- build-test-js
- horizon/block

- update-metaphysics:
filters:
branches:
only:
- beta-ios
- beta-android
requires:
- build-test-app-ios
- build-test-app-android
# - check-code:
# context: danger-github-oss

# - check-and-deploy:
# filters:
# branches:
# only:
# - main

# - test-js

# - build-test-js

# - horizon/block:
# context: horizon
# project_id: 37
# filters:
# branches:
# only:
# - beta-ios
# - beta-android

# - build-test-app-ios:
# filters:
# branches:
# ignore:
# - beta-android
# requires:
# - test-js
# - check-code
# - build-test-js
# - horizon/block

# - build-test-app-android:
# filters:
# branches:
# ignore:
# - beta-ios
# requires:
# - test-js
# - check-code
# - build-test-js
# - horizon/block

# - update-metaphysics:
# filters:
# branches:
# only:
# - beta-ios
# - beta-android
# requires:
# - build-test-app-ios
# - build-test-app-android
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ tsconfig.tsbuildinfo
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# maestro test artifacts
.maestro/*

#########################################################
# Keep this rule last.
# Keep these, so we can keep the folders these appear in.
Expand Down
11 changes: 2 additions & 9 deletions e2e/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
appId: ${MAESTRO_APP_ID}
---
- runFlow:
file: flows/onboarding/login.yml
- runFlow:
file: flows/onboarding/signupWithoutOnboarding.yml
# This flow is broken because of performance issues and hangs of the Art Taste Quiz Screen
# - runFlow:
# file: flows/onboarding/onboardingQuiz.yml
flows:
- "flows/*"
20 changes: 20 additions & 0 deletions e2e/flows/deeplinks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
appId: ${MAESTRO_APP_ID}
---
- runFlow:
file: login.yml
- assertVisible: "New Works for You"
- killApp
- openLink:
link: https://www.artsy.net/artist/kaws
autoVerify: false
- assertVisible: "Kaws"
- killApp
- openLink:
link: https://click.artsy.net/f/a/epPWiX0dJaHHMiXAnSrzSg~~/AAQRxQA~/RgRj95QSP0SQaHR0cHM6Ly93d3cuYXJ0c3kubmV0L2NvbGxlY3Rpb24vYXVjdGlvbi1oaWdobGlnaHRzP3V0bV9zb3VyY2U9YnJhemUmdXRtX21lZGl1bT1lbWFpbCZ1dG1fY2FtcGFpZ249bnRmJnV0bV90ZXJtPTYyMTRmYjlkZWI0ZWZkN2RiNjBjZTcwNDk1NWU4NDQ1VwNzcGNCCmIFEg8VYlEJKGBSEmJyaWJlY2sxQGdtYWlsLmNvbVgEAAAAfw~~
autoVerify: false
- assertVisible: "Highlights at Auction This Week"
- killApp
- openLink:
link: "https://email-link.artsy.net/ls/click?upn=u001.XPbk8dXjc6dwd18Yq2uPM3eTWB4YbDUmeJTAXXTF513sTSKEFRIPxrFgGj8gd2LN9AcRIza5p2-2Fi0huqjv6GWgdnpwA-2FRyTEIYA-2BT1-2F0josxHnYTzJpKeJEmkfzDQlMEY9y6FknqDddY-2BKmm5qtTrTIF2hxySbdUboaYf5ofK-2Bj-2FgSolzBiLvvzai-2FmvjWbSpNpJHWATexQixwLakesmmZUBoRoLkCnxs59pBxJPbB3JZyP13cv77lbfn1WzJ86fiW-2B5MQcd2qss7wLGBI-2BZuy-2FxDkbFuDzpfYPDlaUs1-2BuyO9rqleUCwXPEuyWXZ3aGJrh-_dWIRBTTKlL2IhQqV5a1Cy38Sd4xylePmkTfQkXpdWOLZbG0vcWuzG-2BSSjZ7xaSUgPR0lxFBD0Zz4mpyMqiSRd7GblcbPN8eH0NYfUK6pmADWc2UoFXyJdeq-2F-2BOyOeWlS7O-2FOrHgB9-2BOGtV1nkIFPq97vJTNmWtBMDOt77SsursARR1LHG7CnzBEedV5yll40aEh9LTjA47-2BfpvonTwdxvYfd6ZWsZN2uRczvCs34ipSKUClLSzq0xCn8IjAixssMm2IreBk6LmNzHPC1YLqmZ77pv0qTxX095mxh8mk7f9rJJ8Tg1fyfRFriXGsQqgHlY-2BqTf2aAU6LS9NVXirqdp20-2BHXhzUZbaCnkQNASABts91iKoZaDeV4xnYuuo3L-2F8"
autoVerify: false
- assertVisible: "Jaune 2_40, 2023"
12 changes: 12 additions & 0 deletions e2e/flows/login.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
appId: ${MAESTRO_APP_ID}
---
- launchApp:
clearState: true
clearKeychain: true
- assertVisible: "Sign up or log in"
- tapOn: "Email Input"
- inputText: ${MAESTRO_TEST_EMAIL}
- tapOn: "Continue.*"
- inputText: ${MAESTRO_TEST_PASSWORD}
- tapOn: "Continue.*"
- assertVisible: "New Works for You"
31 changes: 0 additions & 31 deletions e2e/flows/onboarding/login.yml

This file was deleted.

File renamed without changes.
13 changes: 7 additions & 6 deletions e2e/flows/onboarding/signup.yml → e2e/flows/signup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ appId: ${MAESTRO_APP_ID}
- launchApp:
clearState: true
clearKeychain: true
- tapOn: "Sign up.*"
- tapOn: "Continue with Email.*"
- runScript:
file: signup.js
- assertVisible: "Sign up or log in"
- tapOn: "Email Input"
- inputText: ${output.signup.email}
- tapOn: "Next.*"
- tapOn: "Continue.*"
- inputText: ${output.signup.password}
- tapOn: "Next.*"
- tapOn: "Continue.*"
- inputText: "Test McTest"
- runFlow:
when:
platform: iOS
commands:
- tapOn: "checkbox of consent By checking this box, you consent to our Terms of Use, Privacy Policy, and Conditions of Sale."
- tapOn:
point: 15%,36%
- runFlow:
when:
platform: Android
commands:
- tapOn: "Accept terms and privacy policy, Check this element to accept Artsy's terms and privacy policy"
- tapOn: "Next.*"
- tapOn: "Continue.*"
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ appId: ${MAESTRO_APP_ID}
---
- runFlow:
file: signup.yml
- assertVisible: "Ready to find art you love?"
- tapOn: "Skip.*"
- assertVisible: "New Works for You"
6 changes: 6 additions & 0 deletions e2e/set_env_vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# TODO: make work for android as well
export MAESTRO_APP_ID=net.artsy.artsy
export [email protected]
export MAESTRO_TEST_PASSWORD='$###$someT0ughP4$$'
15 changes: 15 additions & 0 deletions install_app_in_booted_sims.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Path to your .app file
APP_PATH="./Artsy.app"

# Get a list of all booted simulator UUIDs
BOOTED_SIMULATORS=$(xcrun simctl list devices booted | grep -oE "[A-F0-9-]{36}")

# Install the .app file on each booted simulator
for SIMULATOR in $BOOTED_SIMULATORS; do
echo "Installing $APP_PATH on simulator $SIMULATOR..."
xcrun simctl install $SIMULATOR "$APP_PATH"
done

echo "Installation completed on all booted simulators!"
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2744,7 +2744,7 @@ SPEC CHECKSUMS:
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
Pulley: edc993fb57f7eb20541c8453d0fce10559f21dac
Quick: ce1276c7c27ba2da3cb2fd0cde053c3648b3b22d
RCT-Folly: 84578c8756030547307e4572ab1947de1685c599
RCT-Folly: 34124ae2e667a0e5f0ea378db071d27548124321
RCTDeprecation: fb7d408617e25d7f537940000d766d60149c5fea
RCTRequired: 9aaf0ffcc1f41f0c671af863970ef25c422a9920
RCTTypeSafety: e9a6e7d48184646eb0610295b74c0dd02768cbb2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const LoginPasswordStepForm: React.FC = () => {

<Input
accessibilityHint="Enter your password"
accessibilityLabel="Password Input"
autoCapitalize="none"
autoComplete="password"
importantForAutofill="yes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const LoginWelcomeStepForm: React.FC = () => {

<Input
accessibilityHint="Enter your email address"
accessibilityLabel="Email Input"
autoCapitalize="none"
autoComplete="username"
importantForAutofill="yes"
Expand Down