termcast 1.3.30 → 1.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/dist/apis/cache.d.ts.map +1 -1
  2. package/dist/apis/cache.js +4 -39
  3. package/dist/apis/cache.js.map +1 -1
  4. package/dist/apis/hud.d.ts.map +1 -1
  5. package/dist/apis/hud.js +13 -31
  6. package/dist/apis/hud.js.map +1 -1
  7. package/dist/apis/localstorage.d.ts.map +1 -1
  8. package/dist/apis/localstorage.js +3 -27
  9. package/dist/apis/localstorage.js.map +1 -1
  10. package/dist/apis/toast.d.ts +16 -43
  11. package/dist/apis/toast.d.ts.map +1 -1
  12. package/dist/apis/toast.js +78 -177
  13. package/dist/apis/toast.js.map +1 -1
  14. package/dist/build.d.ts +3 -1
  15. package/dist/build.d.ts.map +1 -1
  16. package/dist/build.js +52 -2
  17. package/dist/build.js.map +1 -1
  18. package/dist/cli.d.ts +1 -0
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +206 -25
  21. package/dist/cli.js.map +1 -1
  22. package/dist/colors.d.ts.map +1 -1
  23. package/dist/colors.js +1 -0
  24. package/dist/colors.js.map +1 -1
  25. package/dist/compile.d.ts +0 -1
  26. package/dist/compile.d.ts.map +1 -1
  27. package/dist/compile.js +18 -23
  28. package/dist/compile.js.map +1 -1
  29. package/dist/components/actions.d.ts.map +1 -1
  30. package/dist/components/actions.js +30 -15
  31. package/dist/components/actions.js.map +1 -1
  32. package/dist/components/animation-tick.d.ts +12 -0
  33. package/dist/components/animation-tick.d.ts.map +1 -0
  34. package/dist/components/animation-tick.js +63 -0
  35. package/dist/components/animation-tick.js.map +1 -0
  36. package/dist/components/detail.d.ts.map +1 -1
  37. package/dist/components/detail.js +10 -13
  38. package/dist/components/detail.js.map +1 -1
  39. package/dist/components/dropdown.d.ts +1 -0
  40. package/dist/components/dropdown.d.ts.map +1 -1
  41. package/dist/components/dropdown.js +27 -26
  42. package/dist/components/dropdown.js.map +1 -1
  43. package/dist/components/extension-preferences.d.ts.map +1 -1
  44. package/dist/components/extension-preferences.js +15 -10
  45. package/dist/components/extension-preferences.js.map +1 -1
  46. package/dist/components/footer.d.ts +13 -0
  47. package/dist/components/footer.d.ts.map +1 -0
  48. package/dist/components/footer.js +106 -0
  49. package/dist/components/footer.js.map +1 -0
  50. package/dist/components/form/file-autocomplete.d.ts +19 -4
  51. package/dist/components/form/file-autocomplete.d.ts.map +1 -1
  52. package/dist/components/form/file-autocomplete.js +56 -55
  53. package/dist/components/form/file-autocomplete.js.map +1 -1
  54. package/dist/components/form/file-picker.d.ts.map +1 -1
  55. package/dist/components/form/file-picker.js +26 -15
  56. package/dist/components/form/file-picker.js.map +1 -1
  57. package/dist/components/form/index.d.ts.map +1 -1
  58. package/dist/components/form/index.js +17 -15
  59. package/dist/components/form/index.js.map +1 -1
  60. package/dist/components/form/with-left-border.d.ts.map +1 -1
  61. package/dist/components/form/with-left-border.js +4 -12
  62. package/dist/components/form/with-left-border.js.map +1 -1
  63. package/dist/components/list.d.ts.map +1 -1
  64. package/dist/components/list.js +126 -86
  65. package/dist/components/list.js.map +1 -1
  66. package/dist/components/loading-bar.d.ts.map +1 -1
  67. package/dist/components/loading-bar.js +5 -22
  68. package/dist/components/loading-bar.js.map +1 -1
  69. package/dist/components/loading-text.d.ts.map +1 -1
  70. package/dist/components/loading-text.js +3 -22
  71. package/dist/components/loading-text.js.map +1 -1
  72. package/dist/components/theme-picker.d.ts +2 -0
  73. package/dist/components/theme-picker.d.ts.map +1 -0
  74. package/dist/components/theme-picker.js +37 -0
  75. package/dist/components/theme-picker.js.map +1 -0
  76. package/dist/descendants.d.ts +6 -0
  77. package/dist/descendants.d.ts.map +1 -1
  78. package/dist/descendants.js +74 -8
  79. package/dist/descendants.js.map +1 -1
  80. package/dist/examples/internal/descendants-rerender.d.ts +14 -0
  81. package/dist/examples/internal/descendants-rerender.d.ts.map +1 -0
  82. package/dist/examples/internal/descendants-rerender.js +145 -0
  83. package/dist/examples/internal/descendants-rerender.js.map +1 -0
  84. package/dist/examples/internal/simple-dialog.js +4 -1
  85. package/dist/examples/internal/simple-dialog.js.map +1 -1
  86. package/dist/examples/internal/simple-scrollbox.js +1 -1
  87. package/dist/examples/internal/simple-scrollbox.js.map +1 -1
  88. package/dist/examples/list-with-dropdown.js +1 -1
  89. package/dist/examples/list-with-dropdown.js.map +1 -1
  90. package/dist/examples/miscellaneous.js +1 -1
  91. package/dist/examples/miscellaneous.js.map +1 -1
  92. package/dist/examples/toast-action.d.ts +2 -0
  93. package/dist/examples/toast-action.d.ts.map +1 -0
  94. package/dist/examples/toast-action.js +76 -0
  95. package/dist/examples/toast-action.js.map +1 -0
  96. package/dist/examples/toast-variations.js +38 -36
  97. package/dist/examples/toast-variations.js.map +1 -1
  98. package/dist/extensions/dev.d.ts +1 -1
  99. package/dist/extensions/dev.d.ts.map +1 -1
  100. package/dist/extensions/dev.js +62 -30
  101. package/dist/extensions/dev.js.map +1 -1
  102. package/dist/extensions/home.d.ts.map +1 -1
  103. package/dist/extensions/home.js +4 -3
  104. package/dist/extensions/home.js.map +1 -1
  105. package/dist/extensions/react-refresh-init.d.ts +5 -0
  106. package/dist/extensions/react-refresh-init.d.ts.map +1 -0
  107. package/dist/extensions/react-refresh-init.js +52 -0
  108. package/dist/extensions/react-refresh-init.js.map +1 -0
  109. package/dist/internal/date-picker-widget.js +1 -1
  110. package/dist/internal/date-picker-widget.js.map +1 -1
  111. package/dist/internal/dialog.d.ts +8 -3
  112. package/dist/internal/dialog.d.ts.map +1 -1
  113. package/dist/internal/dialog.js +37 -53
  114. package/dist/internal/dialog.js.map +1 -1
  115. package/dist/internal/navigation.d.ts +1 -0
  116. package/dist/internal/navigation.d.ts.map +1 -1
  117. package/dist/internal/navigation.js +25 -1
  118. package/dist/internal/navigation.js.map +1 -1
  119. package/dist/internal/providers.d.ts.map +1 -1
  120. package/dist/internal/providers.js +9 -197
  121. package/dist/internal/providers.js.map +1 -1
  122. package/dist/internal/scrollbox.d.ts.map +1 -1
  123. package/dist/internal/scrollbox.js +1 -0
  124. package/dist/internal/scrollbox.js.map +1 -1
  125. package/dist/release.d.ts +1 -0
  126. package/dist/release.d.ts.map +1 -1
  127. package/dist/release.js +16 -9
  128. package/dist/release.js.map +1 -1
  129. package/dist/state.d.ts +27 -1
  130. package/dist/state.d.ts.map +1 -1
  131. package/dist/state.js +6 -0
  132. package/dist/state.js.map +1 -1
  133. package/dist/theme.d.ts +6 -19
  134. package/dist/theme.d.ts.map +1 -1
  135. package/dist/theme.js +76 -45
  136. package/dist/theme.js.map +1 -1
  137. package/dist/themes/aura.json +69 -0
  138. package/dist/themes/ayu.json +80 -0
  139. package/dist/themes/catppuccin-frappe.json +233 -0
  140. package/dist/themes/catppuccin-macchiato.json +233 -0
  141. package/dist/themes/catppuccin.json +112 -0
  142. package/dist/themes/cobalt2.json +228 -0
  143. package/dist/themes/cursor.json +249 -0
  144. package/dist/themes/dracula.json +219 -0
  145. package/dist/themes/everforest.json +241 -0
  146. package/dist/themes/flexoki.json +237 -0
  147. package/dist/themes/github-light.json +56 -0
  148. package/dist/themes/github.json +241 -0
  149. package/dist/themes/gruvbox.json +95 -0
  150. package/dist/themes/kanagawa.json +77 -0
  151. package/dist/themes/lucent-orng.json +227 -0
  152. package/dist/themes/material.json +235 -0
  153. package/dist/themes/matrix.json +77 -0
  154. package/dist/themes/mercury.json +245 -0
  155. package/dist/themes/monokai.json +221 -0
  156. package/dist/themes/nightowl.json +221 -0
  157. package/dist/themes/nord.json +223 -0
  158. package/dist/themes/one-dark.json +84 -0
  159. package/dist/themes/opencode-light.json +62 -0
  160. package/dist/themes/opencode.json +245 -0
  161. package/dist/themes/orng.json +245 -0
  162. package/dist/themes/palenight.json +222 -0
  163. package/dist/themes/rosepine.json +234 -0
  164. package/dist/themes/solarized.json +223 -0
  165. package/dist/themes/synthwave84.json +226 -0
  166. package/dist/themes/termcast.json +226 -0
  167. package/dist/themes/tokyonight.json +243 -0
  168. package/dist/themes/vercel.json +255 -0
  169. package/dist/themes/vesper.json +218 -0
  170. package/dist/themes/zenburn.json +223 -0
  171. package/dist/themes.d.ts +57 -0
  172. package/dist/themes.d.ts.map +1 -0
  173. package/dist/themes.js +181 -0
  174. package/dist/themes.js.map +1 -0
  175. package/dist/utils/run-command.d.ts +2 -1
  176. package/dist/utils/run-command.d.ts.map +1 -1
  177. package/dist/utils/run-command.js +20 -10
  178. package/dist/utils/run-command.js.map +1 -1
  179. package/dist/utils.d.ts +2 -1
  180. package/dist/utils.d.ts.map +1 -1
  181. package/dist/utils.js +90 -17
  182. package/dist/utils.js.map +1 -1
  183. package/dist/watcher.d.ts +3 -0
  184. package/dist/watcher.d.ts.map +1 -0
  185. package/dist/watcher.js +16 -0
  186. package/dist/watcher.js.map +1 -0
  187. package/package.json +16 -10
  188. package/src/apis/cache.tsx +5 -44
  189. package/src/apis/hud.tsx +17 -62
  190. package/src/apis/localstorage.tsx +3 -32
  191. package/src/apis/toast.tsx +91 -275
  192. package/src/build.test.tsx +10 -0
  193. package/src/build.tsx +61 -1
  194. package/src/cli.tsx +365 -103
  195. package/src/colors.tsx +1 -0
  196. package/src/compile.tsx +21 -29
  197. package/src/compile.vitest.tsx +300 -0
  198. package/src/components/actions.tsx +64 -45
  199. package/src/components/animation-tick.tsx +85 -0
  200. package/src/components/detail.tsx +31 -35
  201. package/src/components/dropdown.tsx +32 -21
  202. package/src/components/extension-preferences.tsx +14 -10
  203. package/src/components/footer.tsx +241 -0
  204. package/src/components/form/file-autocomplete.tsx +80 -60
  205. package/src/components/form/file-picker.tsx +37 -25
  206. package/src/components/form/index.tsx +45 -41
  207. package/src/components/form/with-left-border.tsx +4 -14
  208. package/src/components/list.tsx +181 -121
  209. package/src/components/loading-bar.tsx +5 -25
  210. package/src/components/loading-text.tsx +4 -23
  211. package/src/components/theme-picker.tsx +57 -0
  212. package/src/descendants.tsx +98 -9
  213. package/src/examples/actions-dialog-layout.vitest.tsx +112 -0
  214. package/src/examples/file-autocomplete.vitest.tsx +131 -122
  215. package/src/examples/form-basic.vitest.tsx +463 -644
  216. package/src/examples/form-dropdown.vitest.tsx +553 -571
  217. package/src/examples/form-scroll.vitest.tsx +112 -102
  218. package/src/examples/form-tagpicker.vitest.tsx +364 -338
  219. package/src/examples/internal/descendants-rerender.tsx +273 -0
  220. package/src/examples/internal/descendants-rerender.vitest.tsx +194 -0
  221. package/src/examples/internal/simple-dialog.tsx +4 -4
  222. package/src/examples/internal/simple-scrollbox.tsx +2 -2
  223. package/src/examples/internal/simple-scrollbox.vitest.tsx +43 -31
  224. package/src/examples/list-detail-metadata.vitest.tsx +34 -30
  225. package/src/examples/list-dropdown-default.vitest.tsx +84 -72
  226. package/src/examples/list-empty-view.vitest.tsx +93 -0
  227. package/src/examples/list-fetch-data.vitest.tsx +36 -30
  228. package/src/examples/list-scrollbox.vitest.tsx +59 -39
  229. package/src/examples/list-with-detail.vitest.tsx +339 -314
  230. package/src/examples/list-with-dropdown.tsx +1 -0
  231. package/src/examples/list-with-dropdown.vitest.tsx +176 -150
  232. package/src/examples/list-with-sections.vitest.tsx +289 -270
  233. package/src/examples/list-with-toast.vitest.tsx +44 -44
  234. package/src/examples/miscellaneous.tsx +10 -0
  235. package/src/examples/simple-file-picker.vitest.tsx +90 -86
  236. package/src/examples/simple-grid.vitest.tsx +275 -249
  237. package/src/examples/simple-navigation.vitest.tsx +192 -168
  238. package/src/examples/store.vitest.tsx +6 -4
  239. package/src/examples/swift-extension.vitest.tsx +31 -19
  240. package/src/examples/synonyms.vitest.tsx +93 -83
  241. package/src/examples/toast-action.tsx +160 -0
  242. package/src/examples/toast-action.vitest.tsx +404 -0
  243. package/src/examples/toast-variations.tsx +58 -57
  244. package/src/examples/toast-variations.vitest.tsx +186 -166
  245. package/src/extensions/dev.tsx +74 -33
  246. package/src/extensions/dev.vitest.tsx +162 -69
  247. package/src/extensions/home.tsx +5 -6
  248. package/src/extensions/react-refresh-init.tsx +59 -0
  249. package/src/internal/date-picker-widget.tsx +1 -1
  250. package/src/internal/dialog.tsx +59 -83
  251. package/src/internal/navigation.tsx +37 -4
  252. package/src/internal/providers.tsx +27 -315
  253. package/src/internal/scrollbox.tsx +1 -0
  254. package/src/release.tsx +16 -10
  255. package/src/state.tsx +36 -3
  256. package/src/theme.tsx +82 -51
  257. package/src/themes/aura.json +69 -0
  258. package/src/themes/ayu.json +80 -0
  259. package/src/themes/catppuccin-frappe.json +233 -0
  260. package/src/themes/catppuccin-macchiato.json +233 -0
  261. package/src/themes/catppuccin.json +112 -0
  262. package/src/themes/cobalt2.json +228 -0
  263. package/src/themes/cursor.json +249 -0
  264. package/src/themes/dracula.json +219 -0
  265. package/src/themes/everforest.json +241 -0
  266. package/src/themes/flexoki.json +237 -0
  267. package/src/themes/github-light.json +56 -0
  268. package/src/themes/github.json +241 -0
  269. package/src/themes/gruvbox.json +95 -0
  270. package/src/themes/kanagawa.json +77 -0
  271. package/src/themes/lucent-orng.json +227 -0
  272. package/src/themes/material.json +235 -0
  273. package/src/themes/matrix.json +77 -0
  274. package/src/themes/mercury.json +252 -0
  275. package/src/themes/monokai.json +221 -0
  276. package/src/themes/nightowl.json +221 -0
  277. package/src/themes/nord.json +223 -0
  278. package/src/themes/one-dark.json +84 -0
  279. package/src/themes/opencode-light.json +62 -0
  280. package/src/themes/opencode.json +245 -0
  281. package/src/themes/orng.json +245 -0
  282. package/src/themes/palenight.json +222 -0
  283. package/src/themes/rosepine.json +234 -0
  284. package/src/themes/solarized.json +223 -0
  285. package/src/themes/synthwave84.json +226 -0
  286. package/src/themes/termcast.json +227 -0
  287. package/src/themes/tokyonight.json +243 -0
  288. package/src/themes/vercel.json +255 -0
  289. package/src/themes/vesper.json +218 -0
  290. package/src/themes/zenburn.json +223 -0
  291. package/src/themes.ts +291 -0
  292. package/src/utils/run-command.tsx +23 -12
  293. package/src/utils.tsx +115 -18
  294. package/src/watcher.tsx +19 -0
@@ -32,53 +32,54 @@ test('form basic navigation and input', async () => {
32
32
  "
33
33
 
34
34
 
35
- ■ Form Component Demo █
36
- │ This demonstrates all available form input types. Use arrow █
37
- keys or Tab to navigate between fields.
38
-
39
- Username
40
- Enter your username
41
-
42
- Required field
43
-
44
- Password
45
- Enter secure password
46
- Must be at least 8 characters
47
-
48
- Biography
49
- Tell us about yourself...
50
-
51
-
52
-
53
-
54
- Maximum 500 characters
55
-
56
- Email Preferences
57
- ○ Subscribe to newsletter
58
-
59
- Receive weekly updates
60
-
61
- Country
62
- Select your country
63
-
64
- Americas
65
- ○ United States
66
- ○ Canada
67
- │ ○ Mexico
68
- Europe
69
-
70
- Your country of residence
71
-
72
- Date of Birth
73
-
74
- │ ← 2025 →
75
- ← December →
76
-
77
- Mo Tu We Th Fr Sa Su
78
- │ 1 2 3 4 5 6 7
79
-
80
-
81
- ctrl ↵ submit tab navigate ^k actions"
35
+
36
+
37
+ Form Component Demo █
38
+ This demonstrates all available form input types. Use arrow ▀
39
+ keys or Tab to navigate between fields.
40
+
41
+ ◇ Username
42
+ Enter your username
43
+
44
+ Required field
45
+
46
+ Password
47
+ Enter secure password
48
+ Must be at least 8 characters
49
+
50
+ ◇ Biography
51
+ Tell us about yourself...
52
+
53
+
54
+
55
+
56
+ Maximum 500 characters
57
+
58
+ ◇ Email Preferences
59
+ Subscribe to newsletter
60
+
61
+ Receive weekly updates
62
+
63
+ ◇ Country
64
+ Select your country
65
+
66
+ Americas
67
+ │ ○ United States
68
+ ○ Canada
69
+ ○ Mexico
70
+ Europe
71
+
72
+ Your country of residence
73
+
74
+ ◇ Date of Birth
75
+
76
+ ← 2026 →
77
+ ← January →
78
+
79
+
80
+ ctrl ↵ submit tab navigate ^k actions
81
+
82
+ "
82
83
  `)
83
84
  }, 10000)
84
85
 
@@ -91,247 +92,55 @@ test('password field always shows asterisks and submits real value', async () =>
91
92
 
92
93
  // Tab to password field (tab once to Username, tab again to Password)
93
94
  await session.press('tab')
95
+ await session.waitIdle()
94
96
  await session.press('tab')
97
+ await session.waitIdle()
95
98
 
96
99
  // Type password - should show asterisks
97
- await session.type('secret123')
100
+ const password = 'secret123'
101
+ await session.type(password)
98
102
 
103
+ // Wait for asterisks to appear - use regex to match exactly the password length
104
+ const asterisks = '*'.repeat(password.length)
99
105
  const passwordTypingSnapshot = await session.text({
100
- waitFor: (text) => text.includes('*********'),
106
+ waitFor: (text) => {
107
+ // Match asterisks that aren't followed by more asterisks
108
+ const match = text.match(/(\*+)/)
109
+ return match && match[1].length >= password.length
110
+ },
101
111
  })
102
- expect(passwordTypingSnapshot).toMatchInlineSnapshot(`
103
- "
104
-
105
-
106
- ▪ Form Component Demo █
107
- │ This demonstrates all available form input types. Use arrow █
108
- │ keys or Tab to navigate between fields.
109
-
110
- ◇ Username
111
- │ Enter your username
112
-
113
- │ Required field
114
-
115
- ◆ Password
116
- │ **********
117
- │ Must be at least 8 characters
118
-
119
- ◇ Biography
120
- │ Tell us about yourself...
121
-
122
-
123
-
124
-
125
- │ Maximum 500 characters
126
-
127
- ◇ Email Preferences
128
- │ ○ Subscribe to newsletter
129
-
130
- │ Receive weekly updates
131
-
132
- ◇ Country
133
- │ Select your country
134
-
135
- │ Americas
136
- │ ○ United States
137
- │ ○ Canada
138
- │ ○ Mexico
139
- │ Europe
140
-
141
- │ Your country of residence
142
-
143
- ◇ Date of Birth
144
-
145
- │ ← 2025 →
146
- │ ← December →
147
-
148
- │ Mo Tu We Th Fr Sa Su
149
- │ 1 2 3 4 5 6 7
150
-
151
-
152
- ctrl ↵ submit tab navigate ^k actions"
153
- `)
112
+
113
+ // Verify the password field shows asterisks (don't check exact count due to timing)
114
+ expect(passwordTypingSnapshot).toContain('◆ Password')
115
+ expect(passwordTypingSnapshot).toMatch(/\*{9,}/)
154
116
 
155
- // Tab away - password should now show asterisks
117
+ // Tab away - password should still show asterisks
156
118
  await session.press('tab')
119
+ await session.waitIdle()
157
120
 
158
121
  const passwordUnfocusedSnapshot = await session.text()
159
- expect(passwordUnfocusedSnapshot).toMatchInlineSnapshot(`
160
- "
161
-
162
-
163
- ▪ Form Component Demo █
164
- │ This demonstrates all available form input types. Use arrow █
165
- │ keys or Tab to navigate between fields.
166
-
167
- ◇ Username
168
- │ Enter your username
169
-
170
- │ Required field
171
-
172
- ◇ Password
173
- │ **********
174
- │ Must be at least 8 characters
175
-
176
- ◆ Biography
177
- │ Tell us about yourself...
178
-
179
-
180
-
181
-
182
- │ Maximum 500 characters
183
-
184
- ◇ Email Preferences
185
- │ ○ Subscribe to newsletter
186
-
187
- │ Receive weekly updates
188
-
189
- ◇ Country
190
- │ Select your country
191
-
192
- │ Americas
193
- │ ○ United States
194
- │ ○ Canada
195
- │ ○ Mexico
196
- │ Europe
197
-
198
- │ Your country of residence
199
-
200
- ◇ Date of Birth
201
-
202
- │ ← 2025 →
203
- │ ← December →
204
-
205
- │ Mo Tu We Th Fr Sa Su
206
- │ 1 2 3 4 5 6 7
207
-
208
-
209
- ctrl ↵ submit tab navigate ^k actions"
210
- `)
122
+ // Verify password is still masked and focus moved to Biography
123
+ expect(passwordUnfocusedSnapshot).toContain('◆ Biography')
124
+ expect(passwordUnfocusedSnapshot).toMatch(/\*{9,}/)
211
125
 
212
- // Submit form and check password value is real text not asterisks
213
- // escape to exit textarea, ctrl+k opens action panel, enter to submit
214
- await session.press('escape')
215
- await session.waitIdle()
126
+ // Submit form via ctrl+k action panel
216
127
  await session.press(['ctrl', 'k'])
217
128
  await session.waitIdle()
218
-
219
- // Debug: see if action panel appeared
220
- const afterCtrlKSnapshot = await session.text()
221
- expect(afterCtrlKSnapshot).toMatchInlineSnapshot(`
222
- "
223
129
 
130
+ const afterCtrlKSnapshot = await session.text()
131
+ expect(afterCtrlKSnapshot).toContain('Actions')
132
+ expect(afterCtrlKSnapshot).toContain('Submit Form')
224
133
 
225
- ▪ Form Component Demo █
226
- │ This demonstrates all available form input types. Use arrow █
227
- │ keys or Tab to navigate between fields.
228
-
229
- ◇ Username
230
- │ Enter your username
231
-
232
- │ Required field
233
-
234
- ◇ Password
235
- │ **********
236
- │ Must be at least 8 characters
237
- │┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
238
- ◆┃
239
- │┃ esc
240
- │┃
241
- │┃ Search actions...
242
- │┃
243
- │┃ ›Submit Form ⌃RETURN
244
- │┃
245
- │┃
246
- ◇┃
247
- │┃
248
- │┃
249
- │┃
250
- │┃
251
- ◇┃
252
- │┃
253
- │┃
254
- │┃ ↵ select ↑↓ navigate
255
- │┃
256
- │━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
257
- │ ○ Mexico
258
- │ Europe
259
-
260
- │ Your country of residence
261
-
262
- ◇ Date of Birth
263
-
264
- │ ← 2025 →
265
- │ ← December →
266
-
267
- │ Mo Tu We Th Fr Sa Su
268
- │ 1 2 3 4 5 6 7
269
-
270
-
271
- ctrl ↵ submit tab navigate ^k actions"
272
- `)
273
-
274
134
  await session.press('enter')
275
- await session.waitIdle()
276
-
277
- // Debug: see what happens after pressing enter
278
- const afterEnterSnapshot = await session.text()
279
- expect(afterEnterSnapshot).toMatchInlineSnapshot(`
280
- "
281
135
 
136
+ // Wait for form submission toast
137
+ const afterEnterSnapshot = await session.text({
138
+ waitFor: (text) => text.includes('Form Submitted'),
139
+ })
282
140
 
283
- Form Component Demo █
284
- This demonstrates all available form input types. Use arrow ▀
285
- keys or Tab to navigate between fields.
286
-
287
- ◇ Username
288
- │ Enter your username
289
-
290
- │ Required field
291
-
292
- ◇ Password
293
- │ **********
294
- │ Must be at least 8 characters
295
-
296
- ◆ Biography
297
- │ Tell us about yourself...
298
-
299
-
300
-
301
-
302
- │ Maximum 500 characters
303
-
304
- ◇ Email Preferences
305
- │ ○ Subscribe to newsletter
306
-
307
- │ Receive weekly updates
308
-
309
- ◇ Country
310
- │ Select your country
311
-
312
- │ Americas
313
- │ ○ United States
314
- │ ○ Canada
315
- │ ○ Mexico
316
- │ Europe
317
-
318
- │ Your country of residence
319
-
320
- ◇ Date of Birth
321
-
322
- │ ← 2025 →
323
- │ ← December →
324
-
325
- │ Mo Tu We Th Fr Sa Su
326
- │ 1 2 3 4 5 6 7
327
- ┌────────────────────────────────────────────────┐
328
- │ ✓ Form Submitted │
329
- │ All form data has been captured successfully │
330
- └────────────────────────────────────────────────┘"
331
- `)
332
-
333
- // The toast "Form Submitted" in afterEnterSnapshot proves the form was submitted
334
- // The password was sent as real text (not asterisks) because the onSubmit handler received it
141
+ // The toast "Form Submitted" proves the form was submitted successfully
142
+ expect(afterEnterSnapshot).toContain('Form Submitted')
143
+ expect(afterEnterSnapshot).toContain('All form data has been captured')
335
144
  }, 15000)
336
145
 
337
146
  test('form date picker selection with space and enter', async () => {
@@ -354,53 +163,54 @@ test('form date picker selection with space and enter', async () => {
354
163
  "
355
164
 
356
165
 
357
- ◇ Username
358
- │ Enter your username
359
-
360
- │ Required field
361
-
362
- ◇ Password
363
- │ Enter secure password
364
- │ Must be at least 8 characters
365
-
366
- ◇ Biography
367
- │ Tell us about yourself...
368
-
369
-
370
-
371
-
372
- │ Maximum 500 characters
373
-
374
- ◇ Email Preferences
375
- │ ○ Subscribe to newsletter
376
-
377
- │ Receive weekly updates
378
-
379
- ◆ Country
380
- │ Select your country
381
-
382
- │ Americas
383
- │› ○ United States
384
- │ ○ Canada
385
- │ ○ Mexico
386
- │ Europe
387
-
388
- │ Your country of residence
389
-
390
- ◇ Date of Birth
391
-
392
- │ ← 2025
393
- │ ← December
394
-
395
- │ Mo Tu We Th Fr Sa Su
396
- 1 2 3 4 5 6 7
397
- │ 8 9 10 11 12 13 14
398
- │ 15 16 17 18 19 20 21
399
- │ 22 23 24 25 26 27 28
400
- │ 29 30 31
401
-
402
-
403
- ctrl ↵ submit tab navigate ^k actions"
166
+
167
+
168
+
169
+ │ Required field
170
+
171
+ ◇ Password
172
+ │ Enter secure password
173
+ │ Must be at least 8 characters
174
+
175
+ ◇ Biography
176
+ │ Tell us about yourself...
177
+
178
+
179
+
180
+
181
+ │ Maximum 500 characters
182
+
183
+ ◇ Email Preferences
184
+ │ ○ Subscribe to newsletter
185
+
186
+ │ Receive weekly updates
187
+
188
+ ◆ Country
189
+ │ Select your country
190
+
191
+ │ Americas
192
+ │› ○ United States
193
+ │ ○ Canada
194
+ │ ○ Mexico
195
+ │ Europe
196
+
197
+ │ Your country of residence
198
+
199
+ ◇ Date of Birth
200
+
201
+ │ ← 2026
202
+ │ ← January
203
+
204
+ │ Mo Tu We Th Fr Sa Su
205
+ 1 2 3 4
206
+ 5 6 7 8 9 10 11
207
+ 12 13 14 15 16 17 18
208
+ 19 20 21 22 23 24 25
209
+
210
+
211
+ ctrl ↵ submit tab navigate ^k actions
212
+
213
+ "
404
214
  `)
405
215
 
406
216
  // Select current date with space - should show "Selected:" text
@@ -411,53 +221,54 @@ test('form date picker selection with space and enter', async () => {
411
221
  "
412
222
 
413
223
 
414
- ◇ Username
415
- │ Enter your username
416
-
417
- │ Required field
418
-
419
- ◇ Password
420
- │ Enter secure password
421
- │ Must be at least 8 characters
422
-
423
- ◇ Biography
424
- │ Tell us about yourself...
425
-
426
-
427
-
428
-
429
- │ Maximum 500 characters
430
-
431
- ◇ Email Preferences
432
- │ ○ Subscribe to newsletter
433
-
434
- │ Receive weekly updates
435
-
436
- ◆ Country
437
- │ United States
438
-
439
- │ Americas
440
- │› ● United States
441
- │ ○ Canada
442
- │ ○ Mexico
443
- │ Europe
444
-
445
- │ Your country of residence
446
-
447
- ◇ Date of Birth
448
-
449
- │ ← 2025
450
- │ ← December
451
-
452
- │ Mo Tu We Th Fr Sa Su
453
- 1 2 3 4 5 6 7
454
- │ 8 9 10 11 12 13 14
455
- │ 15 16 17 18 19 20 21
456
- │ 22 23 24 25 26 27 28
457
- │ 29 30 31
458
-
459
-
460
- ctrl ↵ submit tab navigate ^k actions"
224
+
225
+
226
+
227
+ │ Required field
228
+
229
+ ◇ Password
230
+ │ Enter secure password
231
+ │ Must be at least 8 characters
232
+
233
+ ◇ Biography
234
+ │ Tell us about yourself...
235
+
236
+
237
+
238
+
239
+ │ Maximum 500 characters
240
+
241
+ ◇ Email Preferences
242
+ │ ○ Subscribe to newsletter
243
+
244
+ │ Receive weekly updates
245
+
246
+ ◆ Country
247
+ │ United States
248
+
249
+ │ Americas
250
+ │› ● United States
251
+ │ ○ Canada
252
+ │ ○ Mexico
253
+ │ Europe
254
+
255
+ │ Your country of residence
256
+
257
+ ◇ Date of Birth
258
+
259
+ │ ← 2026
260
+ │ ← January
261
+
262
+ │ Mo Tu We Th Fr Sa Su
263
+ 1 2 3 4
264
+ 5 6 7 8 9 10 11
265
+ 12 13 14 15 16 17 18
266
+ 19 20 21 22 23 24 25
267
+
268
+
269
+ ctrl ↵ submit tab navigate ^k actions
270
+
271
+ "
461
272
  `)
462
273
 
463
274
  // Navigate to a different day and select with enter
@@ -469,53 +280,54 @@ test('form date picker selection with space and enter', async () => {
469
280
  "
470
281
 
471
282
 
472
- ◇ Username
473
- │ Enter your username
474
-
475
- │ Required field
476
-
477
- ◇ Password
478
- │ Enter secure password
479
- │ Must be at least 8 characters
480
-
481
- ◇ Biography
482
- │ Tell us about yourself...
483
-
484
-
485
-
486
-
487
- │ Maximum 500 characters
488
-
489
- ◇ Email Preferences
490
- │ ○ Subscribe to newsletter
491
-
492
- │ Receive weekly updates
493
-
494
- ◆ Country
495
- │ United States
496
-
497
- │ Americas
498
- │› ● United States
499
- │ ○ Canada
500
- │ ○ Mexico
501
- │ Europe
502
-
503
- │ Your country of residence
504
-
505
- ◇ Date of Birth
506
-
507
- │ ← 2025
508
- │ ← December
509
-
510
- │ Mo Tu We Th Fr Sa Su
511
- 1 2 3 4 5 6 7
512
- │ 8 9 10 11 12 13 14
513
- │ 15 16 17 18 19 20 21
514
- │ 22 23 24 25 26 27 28
515
- │ 29 30 31
516
-
517
-
518
- ctrl ↵ submit tab navigate ^k actions"
283
+
284
+
285
+
286
+ │ Required field
287
+
288
+ ◇ Password
289
+ │ Enter secure password
290
+ │ Must be at least 8 characters
291
+
292
+ ◇ Biography
293
+ │ Tell us about yourself...
294
+
295
+
296
+
297
+
298
+ │ Maximum 500 characters
299
+
300
+ ◇ Email Preferences
301
+ │ ○ Subscribe to newsletter
302
+
303
+ │ Receive weekly updates
304
+
305
+ ◆ Country
306
+ │ United States
307
+
308
+ │ Americas
309
+ │› ● United States
310
+ │ ○ Canada
311
+ │ ○ Mexico
312
+ │ Europe
313
+
314
+ │ Your country of residence
315
+
316
+ ◇ Date of Birth
317
+
318
+ │ ← 2026
319
+ │ ← January
320
+
321
+ │ Mo Tu We Th Fr Sa Su
322
+ 1 2 3 4
323
+ 5 6 7 8 9 10 11
324
+ 12 13 14 15 16 17 18
325
+ 19 20 21 22 23 24 25
326
+
327
+
328
+ ctrl ↵ submit tab navigate ^k actions
329
+
330
+ "
519
331
  `)
520
332
  }, 10000)
521
333
 
@@ -543,53 +355,54 @@ test('form dropdown navigation', async () => {
543
355
  "
544
356
 
545
357
 
546
- ◇ Username
547
- │ Enter your username
548
-
549
- │ Required field
550
-
551
- ◇ Password
552
- │ Enter secure password
553
- │ Must be at least 8 characters
554
-
555
- ◇ Biography
556
- │ Tell us about yourself...
557
-
558
-
559
-
560
-
561
- │ Maximum 500 characters
562
-
563
- ◇ Email Preferences
564
- │ ○ Subscribe to newsletter
565
-
566
- │ Receive weekly updates
567
-
568
- ◆ Country
569
- │ United States
570
-
571
- │ Americas
572
- │› ● United States
573
- │ ○ Canada
574
- │ ○ Mexico
575
- │ Europe
576
-
577
- │ Your country of residence
578
-
579
- ◇ Date of Birth
580
-
581
- │ ← 2025
582
- │ ← December
583
-
584
- │ Mo Tu We Th Fr Sa Su
585
- 1 2 3 4 5 6 7
586
- │ 8 9 10 11 12 13 14
587
- │ 15 16 17 18 19 20 21
588
- │ 22 23 24 25 26 27 28
589
- │ 29 30 31
590
-
591
-
592
- ctrl ↵ submit tab navigate ^k actions"
358
+
359
+
360
+
361
+ │ Required field
362
+
363
+ ◇ Password
364
+ │ Enter secure password
365
+ │ Must be at least 8 characters
366
+
367
+ ◇ Biography
368
+ │ Tell us about yourself...
369
+
370
+
371
+
372
+
373
+ │ Maximum 500 characters
374
+
375
+ ◇ Email Preferences
376
+ │ ○ Subscribe to newsletter
377
+
378
+ │ Receive weekly updates
379
+
380
+ ◆ Country
381
+ │ United States
382
+
383
+ │ Americas
384
+ │› ● United States
385
+ │ ○ Canada
386
+ │ ○ Mexico
387
+ │ Europe
388
+
389
+ │ Your country of residence
390
+
391
+ ◇ Date of Birth
392
+
393
+ │ ← 2026
394
+ │ ← January
395
+
396
+ │ Mo Tu We Th Fr Sa Su
397
+ 1 2 3 4
398
+ 5 6 7 8 9 10 11
399
+ 12 13 14 15 16 17 18
400
+ 19 20 21 22 23 24 25
401
+
402
+
403
+ ctrl ↵ submit tab navigate ^k actions
404
+
405
+ "
593
406
  `)
594
407
 
595
408
  // Navigate down in dropdown
@@ -600,53 +413,54 @@ test('form dropdown navigation', async () => {
600
413
  "
601
414
 
602
415
 
603
- ◇ Username
604
- │ Enter your username
605
-
606
- │ Required field
607
-
608
- ◇ Password
609
- │ Enter secure password
610
- │ Must be at least 8 characters
611
-
612
- ◇ Biography
613
- │ Tell us about yourself...
614
-
615
-
616
-
617
-
618
- │ Maximum 500 characters
619
-
620
- ◇ Email Preferences
621
- │ ○ Subscribe to newsletter
622
-
623
- │ Receive weekly updates
624
-
625
- ◆ Country
626
- │ United States
627
-
628
- │ Americas
629
- │ ● United States
630
- │› ○ Canada
631
- │ ○ Mexico
632
- │ Europe
633
-
634
- │ Your country of residence
635
-
636
- ◇ Date of Birth
637
-
638
- │ ← 2025
639
- │ ← December
640
-
641
- │ Mo Tu We Th Fr Sa Su
642
- 1 2 3 4 5 6 7
643
- │ 8 9 10 11 12 13 14
644
- │ 15 16 17 18 19 20 21
645
- │ 22 23 24 25 26 27 28
646
- │ 29 30 31
647
-
648
-
649
- ctrl ↵ submit tab navigate ^k actions"
416
+
417
+
418
+
419
+ │ Required field
420
+
421
+ ◇ Password
422
+ │ Enter secure password
423
+ │ Must be at least 8 characters
424
+
425
+ ◇ Biography
426
+ │ Tell us about yourself...
427
+
428
+
429
+
430
+
431
+ │ Maximum 500 characters
432
+
433
+ ◇ Email Preferences
434
+ │ ○ Subscribe to newsletter
435
+
436
+ │ Receive weekly updates
437
+
438
+ ◆ Country
439
+ │ United States
440
+
441
+ │ Americas
442
+ │ ● United States
443
+ │› ○ Canada
444
+ │ ○ Mexico
445
+ │ Europe
446
+
447
+ │ Your country of residence
448
+
449
+ ◇ Date of Birth
450
+
451
+ │ ← 2026
452
+ │ ← January
453
+
454
+ │ Mo Tu We Th Fr Sa Su
455
+ 1 2 3 4
456
+ 5 6 7 8 9 10 11
457
+ 12 13 14 15 16 17 18
458
+ 19 20 21 22 23 24 25
459
+
460
+
461
+ ctrl ↵ submit tab navigate ^k actions
462
+
463
+ "
650
464
  `)
651
465
 
652
466
  // Navigate to Europe section
@@ -659,53 +473,54 @@ test('form dropdown navigation', async () => {
659
473
  "
660
474
 
661
475
 
662
- ◇ Username
663
- │ Enter your username
664
-
665
- │ Required field
666
-
667
- ◇ Password
668
- │ Enter secure password
669
- │ Must be at least 8 characters
670
-
671
- ◇ Biography
672
- │ Tell us about yourself...
673
-
674
-
675
-
676
-
677
- │ Maximum 500 characters
678
-
679
- ◇ Email Preferences
680
- │ ○ Subscribe to newsletter
681
-
682
- │ Receive weekly updates
683
-
684
- ◆ Country
685
- │ United States
686
-
687
- │ ○ Mexico
688
- │ Europe
689
- │ ○ United Kingdom
690
- │› ○ France
691
- │ ○ Germany
692
-
693
- │ Your country of residence
694
-
695
- ◇ Date of Birth
696
-
697
- │ ← 2025
698
- │ ← December
699
-
700
- │ Mo Tu We Th Fr Sa Su
701
- 1 2 3 4 5 6 7
702
- │ 8 9 10 11 12 13 14
703
- │ 15 16 17 18 19 20 21
704
- │ 22 23 24 25 26 27 28
705
- │ 29 30 31
706
-
707
-
708
- ctrl ↵ submit tab navigate ^k actions"
476
+
477
+
478
+
479
+ │ Required field
480
+
481
+ ◇ Password
482
+ │ Enter secure password
483
+ │ Must be at least 8 characters
484
+
485
+ ◇ Biography
486
+ │ Tell us about yourself...
487
+
488
+
489
+
490
+
491
+ │ Maximum 500 characters
492
+
493
+ ◇ Email Preferences
494
+ │ ○ Subscribe to newsletter
495
+
496
+ │ Receive weekly updates
497
+
498
+ ◆ Country
499
+ │ United States
500
+
501
+ │ ○ Mexico
502
+ │ Europe
503
+ │ ○ United Kingdom
504
+ │› ○ France
505
+ │ ○ Germany
506
+
507
+ │ Your country of residence
508
+
509
+ ◇ Date of Birth
510
+
511
+ │ ← 2026
512
+ │ ← January
513
+
514
+ │ Mo Tu We Th Fr Sa Su
515
+ 1 2 3 4
516
+ 5 6 7 8 9 10 11
517
+ 12 13 14 15 16 17 18
518
+ 19 20 21 22 23 24 25
519
+
520
+
521
+ ctrl ↵ submit tab navigate ^k actions
522
+
523
+ "
709
524
  `)
710
525
 
711
526
  // Select France
@@ -716,53 +531,54 @@ test('form dropdown navigation', async () => {
716
531
  "
717
532
 
718
533
 
719
- ◇ Username
720
- │ Enter your username
721
-
722
- │ Required field
723
-
724
- ◇ Password
725
- │ Enter secure password
726
- │ Must be at least 8 characters
727
-
728
- ◇ Biography
729
- │ Tell us about yourself...
730
-
731
-
732
-
733
-
734
- │ Maximum 500 characters
735
-
736
- ◇ Email Preferences
737
- │ ○ Subscribe to newsletter
738
-
739
- │ Receive weekly updates
740
-
741
- ◆ Country
742
- │ France
743
-
744
- │ ○ Mexico
745
- │ Europe
746
- │ ○ United Kingdom
747
- │› ● France
748
- │ ○ Germany
749
-
750
- │ Your country of residence
751
-
752
- ◇ Date of Birth
753
-
754
- │ ← 2025
755
- │ ← December
756
-
757
- │ Mo Tu We Th Fr Sa Su
758
- 1 2 3 4 5 6 7
759
- │ 8 9 10 11 12 13 14
760
- │ 15 16 17 18 19 20 21
761
- │ 22 23 24 25 26 27 28
762
- │ 29 30 31
763
-
764
-
765
- ctrl ↵ submit tab navigate ^k actions"
534
+
535
+
536
+
537
+ │ Required field
538
+
539
+ ◇ Password
540
+ │ Enter secure password
541
+ │ Must be at least 8 characters
542
+
543
+ ◇ Biography
544
+ │ Tell us about yourself...
545
+
546
+
547
+
548
+
549
+ │ Maximum 500 characters
550
+
551
+ ◇ Email Preferences
552
+ │ ○ Subscribe to newsletter
553
+
554
+ │ Receive weekly updates
555
+
556
+ ◆ Country
557
+ │ France
558
+
559
+ │ ○ Mexico
560
+ │ Europe
561
+ │ ○ United Kingdom
562
+ │› ● France
563
+ │ ○ Germany
564
+
565
+ │ Your country of residence
566
+
567
+ ◇ Date of Birth
568
+
569
+ │ ← 2026
570
+ │ ← January
571
+
572
+ │ Mo Tu We Th Fr Sa Su
573
+ 1 2 3 4
574
+ 5 6 7 8 9 10 11
575
+ 12 13 14 15 16 17 18
576
+ 19 20 21 22 23 24 25
577
+
578
+
579
+ ctrl ↵ submit tab navigate ^k actions
580
+
581
+ "
766
582
  `)
767
583
  }, 10000)
768
584
 
@@ -786,23 +602,24 @@ test('form scrolls with mouse wheel', async () => {
786
602
  "
787
603
 
788
604
 
789
- ■ Form Component Demo ▀
790
- │ This demonstrates all available form input types. Use arrow
791
- │ keys or Tab to navigate between fields.
792
-
793
- ◇ Username
794
- │ Enter your username
795
-
796
- │ Required field
797
-
798
- ◇ Password
799
- │ Enter secure password
800
- │ Must be at least 8 characters
801
-
802
- ◇ Biography
803
605
 
804
606
 
805
- ctrl submit tab navigate ^k actions"
607
+ ■ Form Component Demo ▀
608
+ │ This demonstrates all available form input types. Use arrow
609
+ │ keys or Tab to navigate between fields.
610
+
611
+ ◇ Username
612
+ │ Enter your username
613
+
614
+ │ Required field
615
+
616
+ ◇ Password
617
+ │ Enter secure password
618
+
619
+
620
+ ctrl ↵ submit tab navigate ^k actions
621
+
622
+ "
806
623
  `)
807
624
 
808
625
  await session.scrollDown(5)
@@ -813,23 +630,24 @@ test('form scrolls with mouse wheel', async () => {
813
630
  "
814
631
 
815
632
 
816
- │ This demonstrates all available form input types. Use arrow ▄
817
- │ keys or Tab to navigate between fields.
818
-
819
- ◇ Username
820
- │ Enter your username
821
-
822
- │ Required field
823
-
824
- ◇ Password
825
- │ Enter secure password
826
- │ Must be at least 8 characters
827
-
828
- ◇ Biography
829
- │ Tell us about yourself...
830
633
 
831
634
 
832
- ctrl submit tab navigate ^k actions"
635
+ │ This demonstrates all available form input types. Use arrow
636
+ │ keys or Tab to navigate between fields.
637
+
638
+ ◇ Username
639
+ │ Enter your username
640
+
641
+ │ Required field
642
+
643
+ ◇ Password
644
+ │ Enter secure password
645
+ │ Must be at least 8 characters
646
+
647
+
648
+ ctrl ↵ submit tab navigate ^k actions
649
+
650
+ "
833
651
  `)
834
652
 
835
653
  await session.scrollUp(3)
@@ -840,22 +658,23 @@ test('form scrolls with mouse wheel', async () => {
840
658
  "
841
659
 
842
660
 
843
- ■ Form Component Demo ▀
844
- │ This demonstrates all available form input types. Use arrow
845
- │ keys or Tab to navigate between fields.
846
-
847
- ◇ Username
848
- │ Enter your username
849
-
850
- │ Required field
851
-
852
- ◇ Password
853
- │ Enter secure password
854
- │ Must be at least 8 characters
855
-
856
- ◇ Biography
857
661
 
858
662
 
859
- ctrl submit tab navigate ^k actions"
663
+ ■ Form Component Demo ▀
664
+ │ This demonstrates all available form input types. Use arrow
665
+ │ keys or Tab to navigate between fields.
666
+
667
+ ◇ Username
668
+ │ Enter your username
669
+
670
+ │ Required field
671
+
672
+ ◇ Password
673
+ │ Enter secure password
674
+
675
+
676
+ ctrl ↵ submit tab navigate ^k actions
677
+
678
+ "
860
679
  `)
861
680
  }, 10000)