|
| 1 | +steps: |
| 2 | + - echo: Launching Expo Example |
| 3 | + - launch: com.example.ExpoExample |
| 4 | + - await: { visible: { text: "Empty Example" }, timeout: 15000 } |
| 5 | + - echo: "On the Home list, search for the timer example" |
| 6 | + - type: { text: "timer", into: { id: "search-examples" } } |
| 7 | + - echo: "Tap the example to open it" |
| 8 | + - tap: { text: "Timer" } |
| 9 | + - await: { idle: true } |
| 10 | + - await: { visible: { id: "timer-box" } } |
| 11 | + |
| 12 | + - echo: "Clear console" |
| 13 | + - await: { visible: { id: "open-console-button" } } |
| 14 | + - tap: { id: "open-console-button" } |
| 15 | + - await: { visible: { id: "clear-console-button" } } |
| 16 | + - tap: { id: "clear-console-button" } |
| 17 | + - tap: { id: "close-console-button" } |
| 18 | + - await: { idle: true } |
| 19 | + - await: { hidden: { id: "close-console-button" } } |
| 20 | + |
| 21 | + - echo: "Nothing is measured before the first press" |
| 22 | + - assert: { visible: { text: "Last press: none" } } |
| 23 | + |
| 24 | + - echo: "Hold for two seconds - the measured duration is rounded to whole seconds" |
| 25 | + - long-press: { on: { id: "timer-box" }, duration: 2000 } |
| 26 | + - await: { visible: { text: "Last press: 2s" } } |
| 27 | + |
| 28 | + - echo: "Check if console logs are printed in order" |
| 29 | + - tap: { id: "open-console-button" } |
| 30 | + - await: { idle: true } |
| 31 | + - await: { visible: { id: "close-console-button" } } |
| 32 | + - assert: { visible: { text: "1. onBegin" } } |
| 33 | + - assert: { visible: { text: "2. onActivate" } } |
| 34 | + - assert: { visible: { text: "3. onDeactivate" } } |
| 35 | + - assert: { visible: { text: "4. onFinalize (2s)" } } |
| 36 | + |
| 37 | + - echo: "Clear console" |
| 38 | + - tap: { id: "clear-console-button" } |
| 39 | + - tap: { id: "close-console-button" } |
| 40 | + - await: { idle: true } |
| 41 | + - await: { hidden: { id: "close-console-button" } } |
| 42 | + |
| 43 | + - echo: "A longer hold measures a longer duration" |
| 44 | + - long-press: { on: { id: "timer-box" }, duration: 4000 } |
| 45 | + - await: { visible: { text: "Last press: 4s" } } |
| 46 | + |
| 47 | + - echo: "Check if console logs are printed in order" |
| 48 | + - tap: { id: "open-console-button" } |
| 49 | + - await: { idle: true } |
| 50 | + - await: { visible: { id: "close-console-button" } } |
| 51 | + - assert: { visible: { text: "5. onBegin" } } |
| 52 | + - assert: { visible: { text: "6. onActivate" } } |
| 53 | + - assert: { visible: { text: "7. onDeactivate" } } |
| 54 | + - assert: { visible: { text: "8. onFinalize (4s)" } } |
| 55 | + |
| 56 | + - echo: "Clear console" |
| 57 | + - tap: { id: "clear-console-button" } |
| 58 | + - tap: { id: "close-console-button" } |
| 59 | + - await: { idle: true } |
| 60 | + - await: { hidden: { id: "close-console-button" } } |
| 61 | + |
| 62 | + - echo: "A tap is too short to activate the gesture, but it is still measured" |
| 63 | + - tap: { id: "timer-box" } |
| 64 | + - await: { visible: { text: "Last press: 0s" } } |
| 65 | + |
| 66 | + - echo: "The tap begins and finalizes without activating" |
| 67 | + - tap: { id: "open-console-button" } |
| 68 | + - await: { idle: true } |
| 69 | + - await: { visible: { id: "close-console-button" } } |
| 70 | + - assert: { visible: { text: "9. onBegin" } } |
| 71 | + - assert: { visible: { text: "10. onFinalize (0s)" } } |
| 72 | + - assert: { hidden: { text: "onActivate" } } |
| 73 | + - assert: { hidden: { text: "onDeactivate" } } |
0 commit comments