Skip to content

Commit

Permalink
chore: migrate invalid date tests from detox to maestro (#814)
Browse files Browse the repository at this point in the history
* chore: migrate scroll test from detox to maestro

* cleanup

* chore: migrate invalid dates tests from detox to maestro

* uncomment

* restore

* fix expect
  • Loading branch information
henninghall authored May 17, 2024
1 parent 1c36b4b commit c6f796c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 52 deletions.
53 changes: 53 additions & 0 deletions .maestro/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ tags:
- modal
- minuteInterval
- scrollAround
- invalidDates
---
# test: can use modal

Expand Down Expand Up @@ -53,3 +54,55 @@ tags:
- runFlow: utils/swipe-wheel-1.yml
- assertVisible: '2000-01-01 00:00:00'
- tapOn: reset date

# invalid dates
- runFlow: utils/launch.yml
- tapOn: clear minimumDate
- tapOn: clear maximumDate
- tapOn: date mode

## test: scrolls back to last valid date
- runFlow:
file: utils/change-prop.yml
env:
PROP: date
VALUE: '2001-02-28 00:00'
- runFlow: utils/swipe-wheel-2.yml
- assertVisible: '2001-02-28 00:00:00'

# scrolls back after scrolling multiple dates
- runFlow:
file: utils/change-prop.yml
env:
PROP: date
VALUE: '2001-02-27 00:00'
- runFlow: utils/swipe-wheel-2.yml
- runFlow: utils/swipe-wheel-2.yml
- assertVisible: '2001-02-28 00:00:00'

# not scrolling back on unusual valid dates
- runFlow:
file: utils/change-prop.yml
env:
PROP: date
VALUE: '2000-02-28 00:00'
- runFlow: utils/swipe-wheel-2.yml
- assertVisible: '2000-02-29 00:00:00'

# works on months with 30 days
- runFlow:
file: utils/change-prop.yml
env:
PROP: date
VALUE: '2001-04-30 00:00'
- runFlow: utils/swipe-wheel-2.yml
- assertVisible: '2001-04-30 00:00:00'

# works on months with 31 days
- runFlow:
file: utils/change-prop.yml
env:
PROP: date
VALUE: '2001-05-30 00:00'
- runFlow: utils/swipe-wheel-2.yml
- assertVisible: '2001-05-31 00:00:00'
52 changes: 0 additions & 52 deletions examples/detox/e2e/tests/invalidDates.spec.js

This file was deleted.

0 comments on commit c6f796c

Please sign in to comment.