diff --git a/.maestro/other.yml b/.maestro/other.yml new file mode 100644 index 00000000..f05604b1 --- /dev/null +++ b/.maestro/other.yml @@ -0,0 +1,35 @@ +appId: com.rn071 +tags: + - modal + - minuteInterval +--- +# test: can use modal + +- launchApp +- tapOn: Modal +- tapOn: Select date +- runFlow: utils/swipe-wheel-1.yml +- tapOn: Confirm +- assertVisible: '2000-01-02' + +# test: minuteInterval + +- runFlow: utils/launch.yml + +# 1min +- tapOn: 1min interval +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 00:01:00' +- tapOn: reset date + +# 5min +- tapOn: 5min interval +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 00:05:00' +- tapOn: reset date + +# 15min +- tapOn: 15min interval +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-01-01 00:15:00' +- tapOn: reset date diff --git a/examples/Rn071/src/examples/Advanced.js b/examples/Rn071/src/examples/Advanced.js index a71eadc5..ead80d63 100644 --- a/examples/Rn071/src/examples/Advanced.js +++ b/examples/Rn071/src/examples/Advanced.js @@ -106,6 +106,18 @@ export default class Advanced extends Component { onPress={() => this.setState({mode: 'time'})} text={'time mode'} /> + this.setState({minuteInterval: 1})} + text={'1min interval'} + /> + this.setState({minuteInterval: 5})} + text={'5min interval'} + /> + this.setState({minuteInterval: 15})} + text={'15min interval'} + /> scrollWheel(2, 1) - -describe('Minute interval', () => { - before(async () => { - await device.reloadReactNative() - await element(by.text('Advanced')).tap() - }) - - it('1 minute (default)', async () => { - await setMinuteInterval(1) - await scrollMinuteWheel() - await expectDate('2000-01-01 00:01:00') - }) - - it('5 minutes', async () => { - await setMinuteInterval(5) - await scrollMinuteWheel() - await expectDate('2000-01-01 00:05:00') - }) - - it('15 minutes', async () => { - await setMinuteInterval(15) - await scrollMinuteWheel() - await expectDate('2000-01-01 00:15:00') - await scrollMinuteWheel() - await expectDate('2000-01-01 00:30:00') - await scrollMinuteWheel() - await expectDate('2000-01-01 00:45:00') - }) -}) diff --git a/examples/detox/e2e/tests/modal.spec.js b/examples/detox/e2e/tests/modal.spec.js deleted file mode 100644 index fd27a195..00000000 --- a/examples/detox/e2e/tests/modal.spec.js +++ /dev/null @@ -1,20 +0,0 @@ -describe('Modal', () => { - before(async () => { - await device.reloadReactNative() - await element(by.text('Modal')).tap() - }) - - it('can open and close modal', async () => { - await element(by.id('openModal')).tap() - await expect(element(by.id('day'))).toBeVisible() - await expect(element(by.id('minutes'))).toBeVisible() - await expect(element(by.id('hour'))).toBeVisible() - await expect(element(by.id('ampm'))).toBeVisible() - await expect(element(by.id('month'))).not.toExist() - await expect(element(by.id('date'))).not.toExist() - await expect(element(by.id('year'))).not.toExist() - - await element(by.text('CONFIRM')).tap() - await expect(element(by.id('day'))).not.toBeVisible() - }) -})