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: Move E2E tests to Maestro #1905

Closed
wants to merge 16 commits into from
Closed
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
7 changes: 4 additions & 3 deletions .github/workflows/android-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- 'android/**'
- 'common/**'
- 'Example/**'
- 'TestsExample/**'
push:
branches:
- main
Expand Down Expand Up @@ -40,9 +39,11 @@ jobs:
- name: Install node dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn install
- name: Build app
- name: Install Maestro CLI
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn build-e2e-android
run: yarn install-e2e
- name: Export Maestro CLI Path
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
- name: Run emulator and tests
uses: reactivecircus/[email protected]
with:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/ios-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- 'ios/**'
- 'common/**'
- 'Example/**'
- 'TestsExample/**'
push:
branches:
- main
Expand Down Expand Up @@ -39,13 +38,18 @@ jobs:
- name: Install node dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn
- name: Install Facebook IDB tool
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn prepare-e2e-ios
- name: Install pods
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
run: pod install
- name: Build app
- name: Install Maestro CLI
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn build-e2e-ios
- name: Test app
run: yarn install-e2e
- name: Export Maestro CLI Path
run: echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
- name: Run emulator and tests
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn test-e2e-ios
- uses: actions/upload-artifact@v3
Expand Down
11 changes: 11 additions & 0 deletions Example/e2e/bottomTabs/first-screen-and-double-tap-on-tab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-example-BottomTabsAndStack"
- tapOn: "More details 0"
- assertVisible: "More details 1"

- doubleTapOn:
id: "bottom-tabs-A-tab"
- assertVisible: "More details 0"
22 changes: 22 additions & 0 deletions Example/e2e/bottomTabs/go-to-details-screen-and-back.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-example-BottomTabsAndStack"
- tapOn: "More details 0"
- assertVisible: "More details 1"

- runFlow:
when:
platform: iOS
commands:
# TODO: Check if it's possible to tap on type `_UIButtonBarButton`
- tapOn: "Details screen #0"

- runFlow:
when:
platform: Android
commands:
- back

- assertVisible: "More details 0"
8 changes: 8 additions & 0 deletions Example/e2e/bottomTabs/go-to-details-screen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-example-BottomTabsAndStack"
- tapOn: "More details 0"
- assertVisible:
text: "More details 1"
17 changes: 17 additions & 0 deletions Example/e2e/bottomTabs/keep-stack-state-on-tab-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-example-BottomTabsAndStack"
- tapOn: "More details 0"
- tapOn: "More details 1"
- assertVisible: "More details 2"

- tapOn:
id: "bottom-tabs-B-tab"
- assertVisible:
text: "More details 0"

- tapOn:
id: "bottom-tabs-A-tab"
- assertVisible: "More details 2"
9 changes: 9 additions & 0 deletions Example/e2e/bottomTabs/main-screen-and-back.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
appId: ${APP_ID}
---
- launchApp
- assertVisible:
id: "root-screen-example-BottomTabsAndStack"
- tapOn:
id: "root-screen-example-BottomTabsAndStack"
- assertVisible:
id: "bottom-tabs-more-details-button"
8 changes: 8 additions & 0 deletions Example/e2e/bottomTabs/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
appId: ${APP_ID}
---
- runFlow: main-screen-and-back.yml
- runFlow: go-to-details-screen.yml
- runFlow: go-to-details-screen-and-back.yml
- runFlow: switch-between-tabs.yml
- runFlow: first-screen-and-double-tap-on-tab.yml
- runFlow: keep-stack-state-on-tab-change.yml
16 changes: 16 additions & 0 deletions Example/e2e/bottomTabs/switch-between-tabs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-example-BottomTabsAndStack"
- tapOn:
id: "bottom-tabs-B-tab"
- assertVisible:
id: "bottom-tabs-header-right-id"
text: "B"

- tapOn:
id: "bottom-tabs-A-tab"
- assertVisible:
id: "bottom-tabs-header-right-id"
text: "A"
15 changes: 15 additions & 0 deletions Example/e2e/events/android-back-from-chats-none-animation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-playground-Events"
- tapOn:
id: "events-stack-animation-picker"
- tapOn:
id: "stack-animation-none"
- tapOn:
id: "events-go-to-chats"
- back

- assertVisible: "9. Main | transitionStart | opening"
- assertVisible: "10. Main | transitionEnd | opening"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-playground-Events"
- tapOn:
id: "events-stack-animation-picker"
- tapOn:
id: "stack-animation-slide_from_bottom"
- tapOn:
id: "events-go-to-chats"
- back

- assertVisible: "9. Main | transitionStart | opening"
- assertVisible: "10. Main | transitionEnd | opening"
11 changes: 11 additions & 0 deletions Example/e2e/events/android-back-from-chats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-playground-Events"
- tapOn:
id: "events-go-to-chats"
- back

- assertVisible: "9. Main | transitionStart | opening"
- assertVisible: "10. Main | transitionEnd | opening"
30 changes: 30 additions & 0 deletions Example/e2e/events/back-from-chats-none-animation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-playground-Events"
- tapOn:
id: "events-stack-animation-picker"
- tapOn:
id: "stack-animation-none"
- tapOn:
id: "events-go-to-chats"

- runFlow:
when:
platform: iOS
commands:
- tapOn: "Back"

- runFlow:
when:
platform: Android
commands:
- tapOn: "Navigate up"

- assertVisible: "9. Chats | transitionStart | closing"
- assertVisible: "10. Privacy | transitionStart | closing"
- assertVisible: "11. Main | transitionStart | opening"
- assertVisible: "12. Chats | transitionEnd | closing"
- assertVisible: "13. Privacy | transitionEnd | closing"
- assertVisible: "14. Main | transitionEnd | opening"
30 changes: 30 additions & 0 deletions Example/e2e/events/back-from-chats-slide-from-bottom-animation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-playground-Events"
- tapOn:
id: "events-stack-animation-picker"
- tapOn:
id: "stack-animation-slide_from_bottom"
- tapOn:
id: "events-go-to-chats"

- runFlow:
when:
platform: iOS
commands:
- tapOn: "Back"

- runFlow:
when:
platform: Android
commands:
- tapOn: "Navigate up"

- assertVisible: "9. Chats | transitionStart | closing"
- assertVisible: "10. Privacy | transitionStart | closing"
- assertVisible: "11. Main | transitionStart | opening"
- assertVisible: "12. Chats | transitionEnd | closing"
- assertVisible: "13. Privacy | transitionEnd | closing"
- assertVisible: "14. Main | transitionEnd | opening"
26 changes: 26 additions & 0 deletions Example/e2e/events/back-from-chats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-playground-Events"
- tapOn:
id: "events-go-to-chats"

- runFlow:
when:
platform: iOS
commands:
- tapOn: "Back"

- runFlow:
when:
platform: Android
commands:
- tapOn: "Navigate up"

- assertVisible: "9. Chats | transitionStart | closing"
- assertVisible: "10. Privacy | transitionStart | closing"
- assertVisible: "11. Main | transitionStart | opening"
- assertVisible: "12. Chats | transitionEnd | closing"
- assertVisible: "13. Privacy | transitionEnd | closing"
- assertVisible: "14. Main | transitionEnd | opening"
10 changes: 10 additions & 0 deletions Example/e2e/events/check-playground-exist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
appId: ${APP_ID}
---
- launchApp
- assertVisible:
id: "root-screen-playground-Events"
- tapOn:
id: "root-screen-playground-Events"

- assertVisible: "1. Main | transitionStart | opening"
- assertVisible: "2. Main | transitionEnd | opening"
20 changes: 20 additions & 0 deletions Example/e2e/events/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
appId: ${APP_ID}
---
- runFlow: check-playground-exist.yml
- runFlow: back-from-chats.yml
- runFlow: back-from-chats-none-animation.yml
- runFlow: slide-from-bottom-animation.yml
- runFlow: back-from-chats-slide-from-bottom-animation.yml

- runFlow:
when:
platform: Android
file: android-back-from-chats.yml
- runFlow:
when:
platform: Android
file: android-back-from-chats-none-animation.yml
- runFlow:
when:
platform: Android
file: android-back-from-chats-slide-from-bottom-animation.yml
18 changes: 18 additions & 0 deletions Example/e2e/events/slide-from-bottom-animation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "root-screen-playground-Events"
- tapOn:
id: "events-stack-animation-picker"
- tapOn:
id: "stack-animation-slide_from_bottom"
- tapOn:
id: "events-go-to-chats"

- assertVisible: "3. Main | transitionStart | closing"
- assertVisible: "4. Chats | transitionStart | opening"
- assertVisible: "5. Privacy | transitionStart | opening"
- assertVisible: "6. Main | transitionEnd | closing"
- assertVisible: "7. Chats | transitionEnd | opening"
- assertVisible: "8. Privacy | transitionEnd | opening"
Loading
Loading