Skip to content

Commit c6f796c

Browse files
authored
chore: migrate invalid date tests from detox to maestro (#814)
* chore: migrate scroll test from detox to maestro * cleanup * chore: migrate invalid dates tests from detox to maestro * uncomment * restore * fix expect
1 parent 1c36b4b commit c6f796c

File tree

2 files changed

+53
-52
lines changed

2 files changed

+53
-52
lines changed

.maestro/other.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ tags:
44
- modal
55
- minuteInterval
66
- scrollAround
7+
- invalidDates
78
---
89
# test: can use modal
910

@@ -53,3 +54,55 @@ tags:
5354
- runFlow: utils/swipe-wheel-1.yml
5455
- assertVisible: '2000-01-01 00:00:00'
5556
- tapOn: reset date
57+
58+
# invalid dates
59+
- runFlow: utils/launch.yml
60+
- tapOn: clear minimumDate
61+
- tapOn: clear maximumDate
62+
- tapOn: date mode
63+
64+
## test: scrolls back to last valid date
65+
- runFlow:
66+
file: utils/change-prop.yml
67+
env:
68+
PROP: date
69+
VALUE: '2001-02-28 00:00'
70+
- runFlow: utils/swipe-wheel-2.yml
71+
- assertVisible: '2001-02-28 00:00:00'
72+
73+
# scrolls back after scrolling multiple dates
74+
- runFlow:
75+
file: utils/change-prop.yml
76+
env:
77+
PROP: date
78+
VALUE: '2001-02-27 00:00'
79+
- runFlow: utils/swipe-wheel-2.yml
80+
- runFlow: utils/swipe-wheel-2.yml
81+
- assertVisible: '2001-02-28 00:00:00'
82+
83+
# not scrolling back on unusual valid dates
84+
- runFlow:
85+
file: utils/change-prop.yml
86+
env:
87+
PROP: date
88+
VALUE: '2000-02-28 00:00'
89+
- runFlow: utils/swipe-wheel-2.yml
90+
- assertVisible: '2000-02-29 00:00:00'
91+
92+
# works on months with 30 days
93+
- runFlow:
94+
file: utils/change-prop.yml
95+
env:
96+
PROP: date
97+
VALUE: '2001-04-30 00:00'
98+
- runFlow: utils/swipe-wheel-2.yml
99+
- assertVisible: '2001-04-30 00:00:00'
100+
101+
# works on months with 31 days
102+
- runFlow:
103+
file: utils/change-prop.yml
104+
env:
105+
PROP: date
106+
VALUE: '2001-05-30 00:00'
107+
- runFlow: utils/swipe-wheel-2.yml
108+
- assertVisible: '2001-05-31 00:00:00'

examples/detox/e2e/tests/invalidDates.spec.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)