Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
henninghall committed Apr 19, 2024
1 parent 9b858f3 commit 4589552
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 27 deletions.
48 changes: 21 additions & 27 deletions .maestro/display-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ tags:
- android
- displayText
---
- runFlow:
file: utils/set-timezone.yml
env:
REGION: Sweden
GMT: GMT+01:00
STATE: ''
# - runFlow:
# file: utils/set-timezone.yml
# env:
# REGION: Sweden
# GMT: GMT+01:00
# STATE: ''

- runFlow: utils/launch.yml
# test: minuteInterval rounding should round with floor
Expand All @@ -17,23 +17,23 @@ tags:
env:
PROP: minuteInterval
VALUE: 5
- tapOn: change date
- runFlow:
file: utils/change-prop.yml
file: utils/change-prop-value.yml
env:
PROP: date
VALUE: '2000-01-01T00:34:00+01:00'
- runFlow: utils/swipe-wheel-1.yml
- assertVisible: '2000-01-02 00:30:00'

- runFlow: utils/reset.yml

# test: can have initial date in past
- tapOn: clear maximumDate
- tapOn: clear maximumDate
- tapOn: clear minimumDate
- tapOn: change date
- runFlow:
file: utils/change-prop.yml
file: utils/change-prop-value.yml
env:
PROP: date
VALUE: '1999-01-01'
- runFlow: utils/swipe-wheel-1.yml
- assertVisible: '1999-01-02 01:00:00'
Expand All @@ -46,24 +46,27 @@ tags:
LOCALE: en-US
EXPECT: 'Sun Jan 21200 AM '

# test: translates the display text - datetime
- runFlow: reset.yml
- runFlow: utils/reset.yml

test: display text - datetime
# test: display text - datetime
- runFlow:
file: utils/change-locale-and-scroll.yml
env:
LOCALE: vi-VN
EXPECT: 'CN 2 thg 11200 SA '

- runFlow: reset.yml
- runFlow:
file: utils/change-locale-and-scroll.yml
env:
LOCALE: pt-BR
EXPECT: 'dom. 2 de jan. 1200 AM'
EXPECT: 'dom. 2 de jan. 1200 AM '

- runFlow: reset.yml
# Should be possible to use picker with invalid locale
- runFlow:
file: utils/change-locale-and-scroll.yml
env:
LOCALE: xx
EXPECT: '2000-01-02 00:00:00'

# If more tests are needed on datetime locale:
# 'sv-SE', 'sön 2 jan.' + '1200 fm '
Expand All @@ -73,15 +76,7 @@ test: display text - datetime
# 'zh-CH', '1月2日周日 上午 1200'
# 'eu', 'urt. 2 ig.' + ' AM 1200'

# Should be possible to use picker with invalid locale
- runFlow:
file: utils/change-locale-and-scroll.yml
env:
LOCALE: xx
EXPECT: '2000-01-02 00:00:00'

# test: translates the display text - datetime
test: display text - date
# test: display text - date

- tapOn: date mode
- tapOn: clear minimumDate
Expand All @@ -104,7 +99,6 @@ test: display text - date
env:
LOCALE: zh-CH
EXPECT: '2001年一月1日'

# If more tests are needed for date locale:
# 'sv-SE', '2' + 'januari' + '2000'
# 'ko', '2001년' + '1월' + '1일'
Expand Down
9 changes: 9 additions & 0 deletions .maestro/utils/change-prop-value.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
appId: com.rn071
---
- tapOn: clear prop value
- tapOn:
id: propValue
- inputText: ${VALUE}
- hideKeyboard
- tapOn:
id: changeProp
12 changes: 12 additions & 0 deletions examples/Rn071/src/CustomPropValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export default function CustomPropValue(props) {
}}>
<Text style={{color: 'blue'}}>Clear</Text>
</TouchableOpacity>
<MicroButton
text={'clear prop value'}
onPress={() => {
setPropName('date');
}}
/>
<MicroButton
text={'reset date'}
onPress={() =>
Expand All @@ -64,6 +70,12 @@ export default function CustomPropValue(props) {
setPropName('locale');
}}
/>
<MicroButton
text={'change date'}
onPress={() => {
setPropName('date');
}}
/>
</View>
</View>
);
Expand Down

0 comments on commit 4589552

Please sign in to comment.