|
| 1 | +# Android only: a hardware Enter presses each kind of focused gesture-handler |
| 2 | +# control once, as a key with no pointer, where a tap would land. Tab moves |
| 3 | +# focus in view order, so after the taps and the console clear the counts below |
| 4 | +# reach the inner default Pressable, then each control after it. |
| 5 | +steps: |
| 6 | + - echo: Launching Expo Example |
| 7 | + - launch: com.example.ExpoExample |
| 8 | + - await: { visible: { text: "Empty Example" }, timeout: 15000 } |
| 9 | + - when: { platform: android } |
| 10 | + steps: |
| 11 | + - echo: "On the Home list, search for the keyboard activation example" |
| 12 | + - type: { text: "keyboard activation", into: { id: "search-examples" } } |
| 13 | + - await: { visible: { text: "Keyboard activation" } } |
| 14 | + - echo: "Tap the example to open it" |
| 15 | + - tap: { text: "Keyboard activation" } |
| 16 | + - await: { visible: { id: "scaled-touchable" } } |
| 17 | + - await: { idle: true } |
| 18 | + |
| 19 | + - echo: "Clear console" |
| 20 | + - await: { visible: { id: "open-console-button" } } |
| 21 | + - tap: { id: "open-console-button" } |
| 22 | + - await: { visible: { id: "clear-console-button" } } |
| 23 | + - tap: { id: "clear-console-button" } |
| 24 | + - tap: { id: "close-console-button" } |
| 25 | + - await: { hidden: { id: "close-console-button" } } |
| 26 | + - await: { idle: true } |
| 27 | + |
| 28 | + - echo: "Tap the inner state-machine and legacy Pressables, the RectButton and the scaled Touchable" |
| 29 | + - tap: { id: "stateful-inner" } |
| 30 | + - tap: { id: "legacy-inner" } |
| 31 | + - tap: { id: "rect-button" } |
| 32 | + - tap: { id: "scaled-touchable" } |
| 33 | + - await: { idle: true } |
| 34 | + |
| 35 | + - echo: "Each tap presses only its own control" |
| 36 | + - tap: { id: "open-console-button" } |
| 37 | + - await: { idle: true } |
| 38 | + - await: { visible: { id: "close-console-button" } } |
| 39 | + - assert: { visible: { text: { matches: '^3\. \[stateful inner\] onPress$' } } } |
| 40 | + - assert: { visible: { text: { matches: '^6\. \[legacy inner\] onPress$' } } } |
| 41 | + - assert: { visible: { text: { matches: '^7\. \[rect button\] onBegin TOUCH with 1 pointers$' } } } |
| 42 | + - assert: { visible: { text: { matches: '^9\. \[scaled\] tap$' } } } |
| 43 | + - assert: { hidden: { text: "outer]" } } |
| 44 | + |
| 45 | + - echo: "Clear console" |
| 46 | + - tap: { id: "clear-console-button" } |
| 47 | + - tap: { id: "close-console-button" } |
| 48 | + - await: { hidden: { id: "close-console-button" } } |
| 49 | + - await: { idle: true } |
| 50 | + |
| 51 | + - echo: "Tab to the inner default Pressable, which no pointer has touched, and press Enter" |
| 52 | + - tool: keyboard |
| 53 | + args: { key: tab } |
| 54 | + - tool: keyboard |
| 55 | + args: { key: tab } |
| 56 | + - tool: keyboard |
| 57 | + args: { key: enter } |
| 58 | + - echo: "Tab to the state-machine Pressable whose inner was tapped, and press Enter" |
| 59 | + - tool: keyboard |
| 60 | + args: { key: tab } |
| 61 | + - tool: keyboard |
| 62 | + args: { key: enter } |
| 63 | + - echo: "Tab past its inner to the legacy Pressable whose inner was tapped, and press Enter" |
| 64 | + - tool: keyboard |
| 65 | + args: { key: tab } |
| 66 | + - tool: keyboard |
| 67 | + args: { key: tab } |
| 68 | + - tool: keyboard |
| 69 | + args: { key: enter } |
| 70 | + - echo: "Each Enter presses its Pressable once, the parent of a tapped one included" |
| 71 | + - tap: { id: "open-console-button" } |
| 72 | + - await: { idle: true } |
| 73 | + - await: { visible: { id: "close-console-button" } } |
| 74 | + - assert: { visible: { text: { matches: '^10\. \[pressable inner\] onPressIn$' } } } |
| 75 | + - assert: { visible: { text: { matches: '^11\. \[pressable inner\] onPressOut$' } } } |
| 76 | + - assert: { visible: { text: { matches: '^12\. \[pressable inner\] onPress$' } } } |
| 77 | + - assert: { visible: { text: { matches: '^13\. \[stateful outer\] onPressIn$' } } } |
| 78 | + - assert: { visible: { text: { matches: '^14\. \[stateful outer\] onPressOut$' } } } |
| 79 | + - assert: { visible: { text: { matches: '^15\. \[stateful outer\] onPress$' } } } |
| 80 | + - assert: { visible: { text: { matches: '^16\. \[legacy outer\] onPressIn$' } } } |
| 81 | + - assert: { visible: { text: { matches: '^17\. \[legacy outer\] onPressOut$' } } } |
| 82 | + - assert: { visible: { text: { matches: '^18\. \[legacy outer\] onPress$' } } } |
| 83 | + - assert: { hidden: { text: "[pressable outer]" } } |
| 84 | + - assert: { hidden: { text: { matches: '^19\. ' } } } |
| 85 | + |
| 86 | + - echo: "Clear console" |
| 87 | + - tap: { id: "clear-console-button" } |
| 88 | + - tap: { id: "close-console-button" } |
| 89 | + - await: { hidden: { id: "close-console-button" } } |
| 90 | + - await: { idle: true } |
| 91 | + |
| 92 | + - echo: "Tab to the RectButton, the seventh control, and press Enter" |
| 93 | + - tool: keyboard |
| 94 | + args: { key: tab } |
| 95 | + - tool: keyboard |
| 96 | + args: { key: tab } |
| 97 | + - tool: keyboard |
| 98 | + args: { key: tab } |
| 99 | + - tool: keyboard |
| 100 | + args: { key: tab } |
| 101 | + - tool: keyboard |
| 102 | + args: { key: tab } |
| 103 | + - tool: keyboard |
| 104 | + args: { key: tab } |
| 105 | + - tool: keyboard |
| 106 | + args: { key: tab } |
| 107 | + - tool: keyboard |
| 108 | + args: { key: enter } |
| 109 | + - echo: "Tab to the scaled Touchable and press Enter" |
| 110 | + - tool: keyboard |
| 111 | + args: { key: tab } |
| 112 | + - tool: keyboard |
| 113 | + args: { key: enter } |
| 114 | + |
| 115 | + - echo: "Enter reports a key with no pointer, and lands where the tap did" |
| 116 | + - tap: { id: "open-console-button" } |
| 117 | + - await: { idle: true } |
| 118 | + - await: { visible: { id: "close-console-button" } } |
| 119 | + - assert: { visible: { text: { matches: '^19\. \[rect button\] onBegin KEY with 0 pointers$' } } } |
| 120 | + - assert: { visible: { text: { matches: '^20\. \[rect button\] onPress$' } } } |
| 121 | + - assert: { visible: { text: { matches: '^21\. \[scaled\] key press lands on the tap$' } } } |
| 122 | + - assert: { hidden: { text: { matches: '^22\. ' } } } |
| 123 | + |
| 124 | + - echo: "Clear console" |
| 125 | + - tap: { id: "clear-console-button" } |
| 126 | + - tap: { id: "close-console-button" } |
| 127 | + - await: { hidden: { id: "close-console-button" } } |
| 128 | + - await: { idle: true } |
| 129 | + |
| 130 | + - echo: "Tap the input inside the ScrollView, so the soft keyboard is up for it, then Tab to the Pressable beside it and press Enter" |
| 131 | + - tap: { id: "typing-input" } |
| 132 | + - await: { idle: true } |
| 133 | + - tool: keyboard |
| 134 | + args: { key: tab } |
| 135 | + - tool: keyboard |
| 136 | + args: { key: enter } |
| 137 | + |
| 138 | + - echo: "A key press is no tap dismissing the keyboard, so it presses the Pressable once" |
| 139 | + - tap: { id: "open-console-button" } |
| 140 | + - await: { idle: true } |
| 141 | + - await: { visible: { id: "close-console-button" } } |
| 142 | + - assert: { visible: { text: { matches: '^22\. \[typing pressable\] onPressIn$' } } } |
| 143 | + - assert: { visible: { text: { matches: '^23\. \[typing pressable\] onPressOut$' } } } |
| 144 | + - assert: { visible: { text: { matches: '^24\. \[typing pressable\] onPress$' } } } |
| 145 | + - assert: { hidden: { text: { matches: '^25\. ' } } } |
0 commit comments