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 mode tests from detox to maestro #805

Merged
merged 16 commits into from
Apr 19, 2024
58 changes: 58 additions & 0 deletions .maestro/mode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
appId: com.rn071
tags:
- mode
---
- runFlow: utils/launch.yml

# test: 12h time

# datetime
- tapOn: datetime mode
- runFlow: utils/swipe-wheel-1.yml
- runFlow: utils/swipe-wheel-2.yml
- runFlow: utils/swipe-wheel-3.yml
- runFlow: utils/swipe-wheel-4.yml
- assertVisible: '2000-01-02 13:01:00'
- tapOn: reset date

# date
- tapOn: date mode
- tapOn: clear maximumDate
- runFlow: utils/swipe-wheel-1.yml
- runFlow: utils/swipe-wheel-2.yml
- runFlow: utils/swipe-wheel-3.yml
- assertVisible: '2001-02-02 00:00:00'
- tapOn: reset date

# time
- tapOn: time mode
- runFlow: utils/swipe-wheel-1.yml
- runFlow: utils/swipe-wheel-2.yml
- runFlow: utils/swipe-wheel-3.yml
- assertVisible: '2000-01-01 13:01:00'
- tapOn: reset date

# test: 24h time
- runFlow:
when:
visible: 'time format: 12h'
file: utils/set-hour-format.yml

- runFlow: utils/launch.yml

# datetime
- tapOn: datetime mode
- runFlow: utils/swipe-wheel-4.yml # expected not to exist (check needed so that )
- runFlow: utils/swipe-wheel-1.yml
- runFlow: utils/swipe-wheel-2.yml
- runFlow: utils/swipe-wheel-3.yml
- assertVisible: '2000-01-02 01:01:00'
- tapOn: reset date

# time
- tapOn: time mode
- runFlow: utils/swipe-wheel-3.yml # expected not to exist
- runFlow: utils/swipe-wheel-1-no-ampm.yml
- runFlow: utils/swipe-wheel-2.yml
- assertVisible: '2000-01-01 01:01:00'
- tapOn: reset date
16 changes: 16 additions & 0 deletions .maestro/utils/set-hour-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
appId: com.android.settings
---
- launchApp
- runFlow:
when:
visible: 'App info'
file: goto-settings-from-app-info.yml
- tapOn: 'Search settings'
- inputText: 'Date'
- tapOn: 'Date & time'
- tapOn: 'Date & time'

- runFlow:
commands:
- tapOn: 'Use locale default'
- tapOn: 'Use 24-hour format'
1 change: 0 additions & 1 deletion .maestro/utils/set-timezone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ appId: com.android.settings
file: select-utc-offset.yml
env:
GMT: ${GMT}

# on most(?) devices timezone is selected by picking region
- runFlow:
when:
Expand Down
5 changes: 5 additions & 0 deletions .maestro/utils/swipe-wheel-1-no-ampm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
appId: com.rn071
---
- swipe:
start: 45%, 40%
end: 45%, 32%
9 changes: 0 additions & 9 deletions examples/Rn069/e2e/config.json

This file was deleted.

23 changes: 0 additions & 23 deletions examples/Rn069/e2e/environment.js

This file was deleted.

24 changes: 0 additions & 24 deletions examples/Rn069/e2e/tests/24h-mode/hourWheel.spec.js

This file was deleted.

47 changes: 0 additions & 47 deletions examples/Rn069/e2e/tests/24h-mode/mode.spec.js

This file was deleted.

57 changes: 0 additions & 57 deletions examples/Rn069/e2e/tests/invalidDates.spec.js

This file was deleted.

122 changes: 0 additions & 122 deletions examples/Rn069/e2e/tests/maximumDate.spec.js

This file was deleted.

Loading
Loading