Skip to content

Commit

Permalink
maestro: fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nalinbhardwaj committed May 19, 2024
1 parent 1337c91 commit 3122168
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/maestro-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Maestro CI

on:
push:
branches: [master]

jobs:
maestro:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: "20.x"

- name: Install dependencies
run: npm ci

- name: Setup Expo and EAS
uses: expo/expo-github-action@v8
with:
packager: npm
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Run Maestro test suite
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
RUN_ID: ${{ github.event.number || github.run_id }}
run: |
echo "BRANCH_NAME=${BRANCH_NAME}" >> .env.maestro
echo "RUN_ID=${RUN_ID}" >> .env.maestro
npm run build:maestro
working-directory: ./apps/daimo-mobile
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,18 @@ cd apps/daimo-mobile && npm run dev
cd apps/daimo-web && npm run dev
```

</details>

<details>
<summary><strong>Dev quickstart: Maestro</strong></summary>

`daimo-mobile` runs end to end tests with [Maestro](https://maestro.mobile.dev).

To write or run a test locally, first obtain a Expo build labelled with profile `maestro` [here](https://expo.dev/accounts/daimo/projects/daimo/builds).

Then, with Maestro installed, you can simply run `maestro test <test file name>` to run the test. Example: `maestro test .maestro/onboardAndRemove.yaml`.

In the cloud, these tests are run on the master branch using the `maestro-ci` workflow in [Maestro cloud](https://console.mobile.dev).

</details>
</details>
6 changes: 3 additions & 3 deletions apps/daimo-mobile/.maestro/shared/createAccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ appId: com.daimo
- assertVisible: Join waitlist
- tapOn: enter invite code
- inputText: testnet
- hideKeyboard
- assertVisible:
text: "submit"
enabled: true
- tapOn: submit
- inputText: "maestro"
- inputRandomNumber:
length: 8
- wait: 2
- assertVisible:
text: CREATE
text: CREATE ACCOUNT
enabled: true
- tapOn: CREATE
- tapOn: CREATE ACCOUNT
- assertVisible: Notifications
- tapOn: Allow Notifications
- assertVisible: Your balance.*

0 comments on commit 3122168

Please sign in to comment.