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

maestro: testing flows #4374

Merged
merged 36 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e7e3004
e2e: initial test flows w/ Maestro
jamesacklin Dec 5, 2024
cc8a953
Merge branch 'develop' into ja/maestro-e2e
arthyn Jan 23, 2025
f4cc439
maestro: updating self hosted test
arthyn Jan 24, 2025
d7c5151
tests: maestro working for self-hosted and legacy login
arthyn Jan 25, 2025
4aee820
maestro: adding github action
arthyn Jan 27, 2025
10dd2b5
testing: changing flow
arthyn Jan 28, 2025
c58cf45
Merge branch 'develop' into hm/maestro
arthyn Jan 28, 2025
67e3fa4
ops: update workflow
arthyn Jan 28, 2025
607e552
ops: attempting to fix syntax
arthyn Jan 28, 2025
ec041aa
ops: attempting fix syntax pt2
arthyn Jan 28, 2025
51adbe8
maestro: only run ios for now
arthyn Jan 28, 2025
9aba1fc
maestro: make sure jq is installed
arthyn Jan 28, 2025
0f6e77d
maestro: debugging URL grab
arthyn Jan 28, 2025
b131132
maestro: more debugging URL grab
arthyn Jan 28, 2025
73cd287
maestro: more debugging again
arthyn Jan 28, 2025
fd0e063
maestro: operate from proper directory
arthyn Jan 29, 2025
78ed2e1
maestro: fix syntax?
arthyn Jan 29, 2025
d483ce8
maestro: setting dir for everything
arthyn Jan 29, 2025
cac4f7f
maestro: more dir shenanigans
arthyn Jan 29, 2025
2a38529
maestro: putting build back in
arthyn Jan 29, 2025
abac303
maestro: use env vars
arthyn Jan 29, 2025
3b7bb2e
maestro: adding android
arthyn Jan 29, 2025
60d27ef
Merge branch 'develop' into hm/maestro
arthyn Jan 29, 2025
713f63b
maestro: attempting to bump dep for android build
arthyn Jan 29, 2025
464beae
Revert "maestro: attempting to bump dep for android build"
arthyn Jan 30, 2025
e0c075a
Merge branch 'develop' into hm/maestro
arthyn Jan 30, 2025
a9d586b
maestro: switch back to eas cloud and revert strings change
arthyn Jan 30, 2025
97bc391
maestro: make sure pnpm version is correct
arthyn Jan 31, 2025
3e467ff
maestro: use larger worker
arthyn Jan 31, 2025
1a48265
ops: expo doctor fixes minus react-native deps
arthyn Feb 4, 2025
076d07c
Merge branch 'develop' into hm/maestro
arthyn Feb 4, 2025
cf5347c
maestro: remove unnecessary step
arthyn Feb 4, 2025
88dfe97
ops: debug paths in action
arthyn Feb 4, 2025
cdc3174
ops: hopefully right path this time?
arthyn Feb 4, 2025
ade8071
maestro: cleaning up action
arthyn Feb 4, 2025
bed5a5d
Merge branch 'develop' into hm/maestro
arthyn Feb 5, 2025
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
117 changes: 117 additions & 0 deletions .github/workflows/mobile-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Build Tlon Mobile
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
test-ios:
runs-on: ubuntu-latest
name: Test iOS build
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Set up Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Setup PNPM
uses: pnpm/action-setup@v3
- name: "Setup jq"
uses: dcarbone/install-jq-action@v3
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build for selected platforms
id: build
working-directory: ./apps/tlon-mobile
run: |
eas build --profile local-testing --platform ios --non-interactive
URL=$(eas build:list --json --limit=1 --platform=ios --non-interactive | jq '.[0].artifacts.buildUrl')
echo "url=$URL"
echo "url=$URL" >> $GITHUB_OUTPUT
env:
EXPO_APPLE_ID: ${{ secrets.EXPO_APPLE_ID }}
EXPO_APPLE_PASSWORD: ${{ secrets.EXPO_APPLE_PASSWORD }}
NOTIFY_PROVIDER: binnec-dozzod-marnus
NOTIFY_SERVICE: tlon-preview-release
- name: Download and extract build
run: |
echo "Downloading build from ${{ steps.build.outputs.url }}"
curl -L ${{ steps.build.outputs.url }} -o build.tar.gz
tar -xzf build.tar.gz
rm build.tar.gz
ls
- name: Run tests
uses: mobile-dev-inc/action-maestro-cloud@v1
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
project-id: ${{ secrets.ROBIN_PROJECT_ID }}
app-file: Landscape-preview.app
env: |
URL=${{ secrets.MAESTRO_URL }}
CODE=${{ secrets.MAESTRO_CODE }}
EMAIL=${{ secrets.MAESTRO_EMAIL }}
PASSWORD=${{ secrets.MAESTRO_PASSWORD }}
test-android:
runs-on: ubuntu-latest
name: Test Android build
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Set Android Home
run: export ANDROID_HOME=$RUNNER_WORKSPACE/.android/sdk
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Set up Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Setup PNPM
uses: pnpm/action-setup@v3
- name: "Setup jq"
uses: dcarbone/install-jq-action@v3
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build for selected platforms
id: build
working-directory: ./apps/tlon-mobile
run: |
eas build --profile local-testing --platform android --non-interactive
URL=$(eas build:list --json --limit=1 --platform=android --non-interactive | jq '.[0].artifacts.buildUrl')
echo "url=$URL"
echo "url=$URL" >> $GITHUB_OUTPUT
env:
EXPO_APPLE_ID: ${{ secrets.EXPO_APPLE_ID }}
EXPO_APPLE_PASSWORD: ${{ secrets.EXPO_APPLE_PASSWORD }}
NOTIFY_PROVIDER: binnec-dozzod-marnus
NOTIFY_SERVICE: tlon-preview-release
- name: Download and extract build
run: |
echo "Downloading build from ${{ steps.build.outputs.url }}"
curl -L ${{ steps.build.outputs.url }} -o build.apk
- name: Run tests
uses: mobile-dev-inc/action-maestro-cloud@v1
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
project-id: ${{ secrets.ROBIN_PROJECT_ID }}
app-file: ./build.apk
env: |
URL=${{ secrets.MAESTRO_URL }}
CODE=${{ secrets.MAESTRO_CODE }}
EMAIL=${{ secrets.MAESTRO_EMAIL }}
PASSWORD=${{ secrets.MAESTRO_PASSWORD }}
8 changes: 8 additions & 0 deletions .maestro/00-start.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
appId: io.tlon.groups.preview
---
- clearState:
appId: io.tlon.groups.preview
- launchApp:
appId: io.tlon.groups.preview
- runFlow: 01-self-hosted-login.yaml
- runFlow: 02-tlon-login.yaml
49 changes: 49 additions & 0 deletions .maestro/01-self-hosted-login.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
appId: io.tlon.groups.preview
---
- clearState:
appId: io.tlon.groups.preview
- launchApp:
appId: io.tlon.groups.preview
- runFlow:
when:
visible: 'Welcome to TM'
commands:
- swipe:
direction: 'DOWN'
- waitForAnimationToEnd:
timeout: 5000
- tapOn: 'Have an account? Log in'
- tapOn: 'Or configure self hosted'
# Log in
- longPressOn:
id: 'textInput shipUrl'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn: 'Select All'
- eraseText
- inputText: ${URL}
- longPressOn:
id: 'textInput accessCode'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn: 'Select All'
- eraseText
- inputText: ${CODE}
- tapOn: 'Connect'
# Dismiss password save prompt
- runFlow:
when:
visible: 'Not now'
commands:
- tapOn: 'Not now'
- tapOn: 'Next'
- assertVisible: 'Welcome to TM'
- swipe:
direction: 'DOWN'
- waitForAnimationToEnd:
timeout: 5000
- assertVisible: 'Home'
62 changes: 62 additions & 0 deletions .maestro/02-tlon-login.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
appId: io.tlon.groups.preview
---
- clearState:
appId: io.tlon.groups.preview
- launchApp:
appId: io.tlon.groups.preview
- assertVisible: 'Welcome to TM'
- swipe:
direction: 'DOWN'
- waitForAnimationToEnd:
timeout: 5000
- tapOn: 'Have an account? Log in'
- tapOn: 'Log in with Email'
- tapOn:
id: 'Legacy login'
- assertVisible:
'Enter the email and password associated with your Tlon account.'
# Enter invalid email
- tapOn:
id: 'email-input'
- inputText: 'invalid-email'
- assertVisible: 'Please enter a valid email address.'
- longPressOn:
id: 'email-input'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn: 'Select All'
- eraseText
- inputText: ${EMAIL}
# Enter invalid password
- tapOn:
id: 'password-input'
- inputText: 'invalid-password'
- tapOn: 'Submit'
- assertVisible: 'Incorrect email or password.'
- doubleTapOn:
id: 'password-input'
- runFlow:
when:
visible: 'Select All'
commands:
- tapOn: 'Select All'
- eraseText
# Log in for real
- tapOn:
id: 'password-input'
- inputText: ${PASSWORD}
- tapOn: 'Submit'
# Dismiss password save prompt
- runFlow:
when:
visible: 'Not now'
commands:
- tapOn: 'Not now'
- assertVisible: 'Welcome to TM'
- swipe:
direction: 'DOWN'
- waitForAnimationToEnd:
timeout: 5000
- assertVisible: 'Home'
4 changes: 4 additions & 0 deletions .maestro/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
flows:
- '00-start.yaml'

baselineBranch: develop
16 changes: 16 additions & 0 deletions apps/tlon-mobile/eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@
"image": "latest"
}
},
"local-testing": {
"extends": "base",
"channel": "local",
"env": {
"APP_VARIANT": "preview"
},
"android": {
"resourceClass": "large",
"gradleCommand": ":app:assemblePreviewRelease",
"buildType": "apk"
},
"ios": {
"scheme": "Landscape-preview",
"simulator": true
}
},
"local": {
"channel": "local",
"env": {
Expand Down
24 changes: 24 additions & 0 deletions apps/tlon-mobile/ios/Landscape.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,16 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Landscape-preview/Pods-Landscape-preview-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/EXApplication/ExpoApplication_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXMediaLibrary/ExpoMediaLibrary_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXNotifications/ExpoNotifications_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXTaskManager/ExpoTaskManager_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXUpdates/EXUpdates.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoDevice/ExpoDevice_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoLocalization/ExpoLocalization_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseABTesting/FirebaseABTesting_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreExtension/FirebaseCoreExtension_Privacy.bundle",
Expand All @@ -991,10 +997,16 @@
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoApplication_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoMediaLibrary_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoNotifications_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoTaskManager_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXUpdates.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoDevice_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoLocalization_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseABTesting_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCore_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreExtension_Privacy.bundle",
Expand Down Expand Up @@ -1078,10 +1090,16 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Landscape/Pods-Landscape-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/EXApplication/ExpoApplication_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXMediaLibrary/ExpoMediaLibrary_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXNotifications/ExpoNotifications_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXTaskManager/ExpoTaskManager_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXUpdates/EXUpdates.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoDevice/ExpoDevice_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoLocalization/ExpoLocalization_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseABTesting/FirebaseABTesting_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreExtension/FirebaseCoreExtension_Privacy.bundle",
Expand All @@ -1101,10 +1119,16 @@
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoApplication_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoMediaLibrary_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoNotifications_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoTaskManager_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXUpdates.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoDevice_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoLocalization_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseABTesting_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCore_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreExtension_Privacy.bundle",
Expand Down
20 changes: 10 additions & 10 deletions apps/tlon-mobile/ios/Landscape/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
<string>0A2A.1</string>
<string>3B52.1</string>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
<string>85F4.1</string>
</array>
</dict>
<dict>
Expand All @@ -41,6 +32,15 @@
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
<string>85F4.1</string>
</array>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
Expand Down
Loading