From 9bacc6eb5c269a3286017073593684f926ab5524 Mon Sep 17 00:00:00 2001 From: Henning Hall Date: Fri, 17 May 2024 12:30:36 +0200 Subject: [PATCH 1/2] chore: migrate scroll test from detox to maestro --- .maestro/other.yml | 26 ++++++++++-- examples/detox/e2e/tests/scrollAround.spec.js | 41 ------------------- 2 files changed, 22 insertions(+), 45 deletions(-) delete mode 100644 examples/detox/e2e/tests/scrollAround.spec.js diff --git a/.maestro/other.yml b/.maestro/other.yml index abb70ef4..aa57c662 100644 --- a/.maestro/other.yml +++ b/.maestro/other.yml @@ -3,9 +3,9 @@ tags: - android - modal - minuteInterval + - scrollAround --- # test: can use modal - - launchApp - tapOn: Modal - tapOn: Select date @@ -17,20 +17,38 @@ tags: - runFlow: utils/launch.yml -# 1min +# # 1min - tapOn: 1min interval - runFlow: utils/swipe-wheel-3.yml - assertVisible: '2000-01-01 00:01:00' - tapOn: reset date -# 5min +# # 5min - tapOn: 5min interval - runFlow: utils/swipe-wheel-3.yml - assertVisible: '2000-01-01 00:05:00' - tapOn: reset date -# 15min +# # 15min - tapOn: 15min interval - runFlow: utils/swipe-wheel-3.yml - assertVisible: '2000-01-01 00:15:00' - tapOn: reset date + +# test: scroll around + +# minute wheel should be possible to scroll around +- tapOn: 15min interval +- runFlow: utils/swipe-wheel-3.yml +- runFlow: utils/swipe-wheel-3.yml +- runFlow: utils/swipe-wheel-3.yml +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 00:00:00' +- tapOn: reset date + +# day wheel should change year when passing new year +- runFlow: utils/swipe-wheel-1-up.yml +- assertVisible: '1999-12-31 00:00:00' +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-01-01 00:00:00' +- tapOn: reset date diff --git a/examples/detox/e2e/tests/scrollAround.spec.js b/examples/detox/e2e/tests/scrollAround.spec.js deleted file mode 100644 index 4aca776e..00000000 --- a/examples/detox/e2e/tests/scrollAround.spec.js +++ /dev/null @@ -1,41 +0,0 @@ -const { scrollWheel, expectDate } = require('../utils') - -describe('Scroll around', () => { - before(async () => { - await device.reloadReactNative() - await element(by.text('Advanced')).tap() - }) - - it.skip('Hour wheel should scroll all way around and switch AM/PM when passing 12', async () => { - await scroll3HoursAndExpect('2000-01-01 03:00:00') - await scroll3HoursAndExpect('2000-01-01 06:00:00') - await scroll3HoursAndExpect('2000-01-01 09:00:00') - await scrollWheel(1, 2) - await expectDate('2000-01-01 11:00:00') - await scrollWheel(1, 2) - await expectDate('2000-01-01 13:00:00') - await scroll3HoursAndExpect('2000-01-01 16:00:00') - await scroll3HoursAndExpect('2000-01-01 19:00:00') - await scroll3HoursAndExpect('2000-01-01 22:00:00') - await scroll3HoursAndExpect('2000-01-01 01:00:00') - }) - - it('Minute wheel should be possible to scroll all way around', async () => { - await scrollWheel(2, 55) - await expectDate('2000-01-01 00:55:00') - await scrollWheel(2, 10) - await expectDate('2000-01-01 00:05:00') - }) - - it('Day wheel should change year when passing new year', async () => { - await scrollWheel(0, -1) - await expectDate('1999-12-31 00:00:00') - await scrollWheel(0, 1) - await expectDate('2000-01-01 00:00:00') - }) - - const scroll3HoursAndExpect = async date => { - await scrollWheel(1, 3) - await expectDate(date) - } -}) From 79bb3e0960e8e712f885d51ee3747e46ee04cdf3 Mon Sep 17 00:00:00 2001 From: Henning Hall Date: Fri, 17 May 2024 12:32:06 +0200 Subject: [PATCH 2/2] cleanup --- .maestro/other.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.maestro/other.yml b/.maestro/other.yml index aa57c662..cb6238e8 100644 --- a/.maestro/other.yml +++ b/.maestro/other.yml @@ -6,6 +6,7 @@ tags: - scrollAround --- # test: can use modal + - launchApp - tapOn: Modal - tapOn: Select date @@ -17,19 +18,19 @@ tags: - runFlow: utils/launch.yml -# # 1min +# 1min - tapOn: 1min interval - runFlow: utils/swipe-wheel-3.yml - assertVisible: '2000-01-01 00:01:00' - tapOn: reset date -# # 5min +# 5min - tapOn: 5min interval - runFlow: utils/swipe-wheel-3.yml - assertVisible: '2000-01-01 00:05:00' - tapOn: reset date -# # 15min +# 15min - tapOn: 15min interval - runFlow: utils/swipe-wheel-3.yml - assertVisible: '2000-01-01 00:15:00'