From 7102868103ee99f9584964ac9869c9a801d19615 Mon Sep 17 00:00:00 2001 From: Henning Hall Date: Fri, 17 May 2024 14:58:42 +0200 Subject: [PATCH 1/5] chore: migrate wheel order test from detox to maestro --- .maestro/wheel-order.yml | 116 ++++++++++++++++++++ examples/detox/e2e/tests/wheelOrder.spec.js | 90 --------------- 2 files changed, 116 insertions(+), 90 deletions(-) create mode 100644 .maestro/wheel-order.yml delete mode 100644 examples/detox/e2e/tests/wheelOrder.spec.js diff --git a/.maestro/wheel-order.yml b/.maestro/wheel-order.yml new file mode 100644 index 00000000..5f23b49e --- /dev/null +++ b/.maestro/wheel-order.yml @@ -0,0 +1,116 @@ +appId: com.rn071 +tags: + - android + - wheelOrder +--- +# test: can use modal + +- runFlow: utils/launch.yml +- tapOn: clear maximumDate + +# datetime mode +- tapOn: datetime mode + +# us +- tapOn: locale en-US + +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-01-02 00:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-01-01 01:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 00:01:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-4.yml +- assertVisible: '2000-01-01 12:00:00' +- tapOn: reset date + +# korean +- tapOn: locale ko-KR + +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-01-02 00:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-01-01 12:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 01:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-4.yml +- assertVisible: '2000-01-01 00:01:00' +- tapOn: reset date + +# date mode +- tapOn: date mode + +# us +- tapOn: locale en-US + +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-02-01 00:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-01-02 00:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2001-01-01 00:00:00' +- tapOn: reset date + +# korean +- tapOn: locale ko-KR + +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2001-01-01 00:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-02-01 00:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-02 00:00:00' +- tapOn: reset date + +# time mode +- tapOn: time mode + +# us +- tapOn: locale en-US + +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-01-01 01:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-01-00 00:01:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 12:00:00' +- tapOn: reset date + +# korean +- tapOn: locale ko-KR + +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-01-01 12:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-01-00 01:00:00' +- tapOn: reset date + +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 00:01:00' +- tapOn: reset date diff --git a/examples/detox/e2e/tests/wheelOrder.spec.js b/examples/detox/e2e/tests/wheelOrder.spec.js deleted file mode 100644 index 370571c6..00000000 --- a/examples/detox/e2e/tests/wheelOrder.spec.js +++ /dev/null @@ -1,90 +0,0 @@ -const { - scrollWheelWithIndexAndExpectDate, - setMode, - setLocale, - setMaximumDate, -} = require('../utils') - -describe('Wheel order', () => { - before(async () => { - await device.reloadReactNative() - await element(by.text('Advanced')).tap() - await setMaximumDate('undefined') - }) - - describe('datetime', () => { - before(async () => { - await setMode('datetime') - }) - - it('US', async () => { - await setLocale('en-US') - await scrollWheelWithIndexAndExpectDate(0, '2000-01-02 00:00:00') - await scrollWheelWithIndexAndExpectDate(1, '2000-01-01 01:00:00') - await scrollWheelWithIndexAndExpectDate(2, '2000-01-01 00:01:00') - await scrollWheelWithIndexAndExpectDate(3, '2000-01-01 12:00:00') - }) - - it('Korean', async () => { - await setLocale('ko-KR') - await scrollWheelWithIndexAndExpectDate(0, '2000-01-02 00:00:00') - await scrollWheelWithIndexAndExpectDate(1, '2000-01-01 12:00:00') - await scrollWheelWithIndexAndExpectDate(2, '2000-01-01 01:00:00') - await scrollWheelWithIndexAndExpectDate(3, '2000-01-01 00:01:00') - }) - }) - - describe('date', () => { - before(async () => { - await setMode('date') - }) - - it('US', async () => { - await setLocale('en-US') - await scrollWheelWithIndexAndExpectDate(0, '2000-02-01 00:00:00') - await scrollWheelWithIndexAndExpectDate(1, '2000-01-02 00:00:00') - await scrollWheelWithIndexAndExpectDate(2, '2001-01-01 00:00:00') - }) - - it('UK', async () => { - await setLocale('en-GB') - await scrollWheelWithIndexAndExpectDate(0, '2000-01-02 00:00:00') - await scrollWheelWithIndexAndExpectDate(1, '2000-02-01 00:00:00') - await scrollWheelWithIndexAndExpectDate(2, '2001-01-01 00:00:00') - }) - - it('Korean', async () => { - await setLocale('ko-KR') - await scrollWheelWithIndexAndExpectDate(0, '2001-01-01 00:00:00') - await scrollWheelWithIndexAndExpectDate(1, '2000-02-01 00:00:00') - await scrollWheelWithIndexAndExpectDate(2, '2000-01-02 00:00:00') - }) - }) - - describe('time', () => { - before(async () => { - await setMode('time') - }) - - it('US', async () => { - await setLocale('en-US') - await scrollWheelWithIndexAndExpectDate(0, '2000-01-01 01:00:00') - await scrollWheelWithIndexAndExpectDate(1, '2000-01-01 00:01:00') - await scrollWheelWithIndexAndExpectDate(2, '2000-01-01 12:00:00') - }) - - it('UK', async () => { - await setLocale('en-GB') - await scrollWheelWithIndexAndExpectDate(0, '2000-01-01 01:00:00') - await scrollWheelWithIndexAndExpectDate(1, '2000-01-01 00:01:00') - await scrollWheelWithIndexAndExpectDate(2, '2000-01-01 12:00:00') - }) - - it('Korean', async () => { - await setLocale('ko-KR') - await scrollWheelWithIndexAndExpectDate(0, '2000-01-01 12:00:00') - await scrollWheelWithIndexAndExpectDate(1, '2000-01-01 01:00:00') - await scrollWheelWithIndexAndExpectDate(2, '2000-01-01 00:01:00') - }) - }) -}) From 1769bb075e895af064247d95693d2d8b39ae0f0d Mon Sep 17 00:00:00 2001 From: Henning Hall Date: Fri, 17 May 2024 14:59:19 +0200 Subject: [PATCH 2/5] fix --- .maestro/wheel-order.yml | 112 +++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/.maestro/wheel-order.yml b/.maestro/wheel-order.yml index 5f23b49e..22e95289 100644 --- a/.maestro/wheel-order.yml +++ b/.maestro/wheel-order.yml @@ -8,81 +8,81 @@ tags: - runFlow: utils/launch.yml - tapOn: clear maximumDate -# datetime mode -- tapOn: datetime mode +# # datetime mode +# - tapOn: datetime mode -# us -- tapOn: locale en-US +# # us +# - tapOn: locale en-US -- runFlow: utils/swipe-wheel-1.yml -- assertVisible: '2000-01-02 00:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-1.yml +# - assertVisible: '2000-01-02 00:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-2.yml -- assertVisible: '2000-01-01 01:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-2.yml +# - assertVisible: '2000-01-01 01:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-3.yml -- assertVisible: '2000-01-01 00:01:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-3.yml +# - assertVisible: '2000-01-01 00:01:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-4.yml -- assertVisible: '2000-01-01 12:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-4.yml +# - assertVisible: '2000-01-01 12:00:00' +# - tapOn: reset date -# korean -- tapOn: locale ko-KR +# # korean +# - tapOn: locale ko-KR -- runFlow: utils/swipe-wheel-1.yml -- assertVisible: '2000-01-02 00:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-1.yml +# - assertVisible: '2000-01-02 00:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-2.yml -- assertVisible: '2000-01-01 12:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-2.yml +# - assertVisible: '2000-01-01 12:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-3.yml -- assertVisible: '2000-01-01 01:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-3.yml +# - assertVisible: '2000-01-01 01:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-4.yml -- assertVisible: '2000-01-01 00:01:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-4.yml +# - assertVisible: '2000-01-01 00:01:00' +# - tapOn: reset date -# date mode -- tapOn: date mode +# # date mode +# - tapOn: date mode -# us -- tapOn: locale en-US +# # us +# - tapOn: locale en-US -- runFlow: utils/swipe-wheel-1.yml -- assertVisible: '2000-02-01 00:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-1.yml +# - assertVisible: '2000-02-01 00:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-2.yml -- assertVisible: '2000-01-02 00:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-2.yml +# - assertVisible: '2000-01-02 00:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-3.yml -- assertVisible: '2001-01-01 00:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-3.yml +# - assertVisible: '2001-01-01 00:00:00' +# - tapOn: reset date -# korean -- tapOn: locale ko-KR +# # korean +# - tapOn: locale ko-KR -- runFlow: utils/swipe-wheel-1.yml -- assertVisible: '2001-01-01 00:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-1.yml +# - assertVisible: '2001-01-01 00:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-2.yml -- assertVisible: '2000-02-01 00:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-2.yml +# - assertVisible: '2000-02-01 00:00:00' +# - tapOn: reset date -- runFlow: utils/swipe-wheel-3.yml -- assertVisible: '2000-01-02 00:00:00' -- tapOn: reset date +# - runFlow: utils/swipe-wheel-3.yml +# - assertVisible: '2000-01-02 00:00:00' +# - tapOn: reset date -# time mode +# # time mode - tapOn: time mode # us @@ -93,7 +93,7 @@ tags: - tapOn: reset date - runFlow: utils/swipe-wheel-2.yml -- assertVisible: '2000-01-00 00:01:00' +- assertVisible: '2000-01-01 00:01:00' - tapOn: reset date - runFlow: utils/swipe-wheel-3.yml From 5994764f4728eddee3d45c5fdc33cd3099f4beda Mon Sep 17 00:00:00 2001 From: Henning Hall Date: Fri, 17 May 2024 15:00:25 +0200 Subject: [PATCH 3/5] fix --- .maestro/wheel-order.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.maestro/wheel-order.yml b/.maestro/wheel-order.yml index 22e95289..0de45137 100644 --- a/.maestro/wheel-order.yml +++ b/.maestro/wheel-order.yml @@ -108,7 +108,7 @@ tags: - tapOn: reset date - runFlow: utils/swipe-wheel-2.yml -- assertVisible: '2000-01-00 01:00:00' +- assertVisible: '2000-01-01 01:00:00' - tapOn: reset date - runFlow: utils/swipe-wheel-3.yml From bf412b55c338f09387e49a33eb72070003c57835 Mon Sep 17 00:00:00 2001 From: Henning Hall Date: Fri, 17 May 2024 15:02:54 +0200 Subject: [PATCH 4/5] add locale buttons --- examples/Rn071/src/examples/Advanced.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/Rn071/src/examples/Advanced.js b/examples/Rn071/src/examples/Advanced.js index ead80d63..11be9431 100644 --- a/examples/Rn071/src/examples/Advanced.js +++ b/examples/Rn071/src/examples/Advanced.js @@ -118,6 +118,18 @@ export default class Advanced extends Component { onPress={() => this.setState({minuteInterval: 15})} text={'15min interval'} /> + this.setState({locale: 'en-US'})} + text={'locale en-US'} + /> + this.setState({locale: 'en-GB'})} + text={'locale en-GB'} + /> + this.setState({locale: 'ko-KR'})} + text={'locale ko-KR'} + /> Date: Fri, 17 May 2024 15:03:29 +0200 Subject: [PATCH 5/5] uncomment --- .maestro/wheel-order.yml | 110 +++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/.maestro/wheel-order.yml b/.maestro/wheel-order.yml index 0de45137..f9e4c79a 100644 --- a/.maestro/wheel-order.yml +++ b/.maestro/wheel-order.yml @@ -8,81 +8,81 @@ tags: - runFlow: utils/launch.yml - tapOn: clear maximumDate -# # datetime mode -# - tapOn: datetime mode +# datetime mode +- tapOn: datetime mode -# # us -# - tapOn: locale en-US +# us +- tapOn: locale en-US -# - runFlow: utils/swipe-wheel-1.yml -# - assertVisible: '2000-01-02 00:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-01-02 00:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-2.yml -# - assertVisible: '2000-01-01 01:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-01-01 01:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-3.yml -# - assertVisible: '2000-01-01 00:01:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 00:01:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-4.yml -# - assertVisible: '2000-01-01 12:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-4.yml +- assertVisible: '2000-01-01 12:00:00' +- tapOn: reset date -# # korean -# - tapOn: locale ko-KR +# korean +- tapOn: locale ko-KR -# - runFlow: utils/swipe-wheel-1.yml -# - assertVisible: '2000-01-02 00:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-01-02 00:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-2.yml -# - assertVisible: '2000-01-01 12:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-01-01 12:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-3.yml -# - assertVisible: '2000-01-01 01:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 01:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-4.yml -# - assertVisible: '2000-01-01 00:01:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-4.yml +- assertVisible: '2000-01-01 00:01:00' +- tapOn: reset date -# # date mode -# - tapOn: date mode +# date mode +- tapOn: date mode -# # us -# - tapOn: locale en-US +# us +- tapOn: locale en-US -# - runFlow: utils/swipe-wheel-1.yml -# - assertVisible: '2000-02-01 00:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2000-02-01 00:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-2.yml -# - assertVisible: '2000-01-02 00:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-01-02 00:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-3.yml -# - assertVisible: '2001-01-01 00:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2001-01-01 00:00:00' +- tapOn: reset date -# # korean -# - tapOn: locale ko-KR +# korean +- tapOn: locale ko-KR -# - runFlow: utils/swipe-wheel-1.yml -# - assertVisible: '2001-01-01 00:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: '2001-01-01 00:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-2.yml -# - assertVisible: '2000-02-01 00:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-2.yml +- assertVisible: '2000-02-01 00:00:00' +- tapOn: reset date -# - runFlow: utils/swipe-wheel-3.yml -# - assertVisible: '2000-01-02 00:00:00' -# - tapOn: reset date +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-02 00:00:00' +- tapOn: reset date -# # time mode +# time mode - tapOn: time mode # us