Commit f694b22
test: re-enable the Cmd/Ctrl+Enter form submit hotkey spec
The example was commented out because it dispatched the keydown on
`document.body`. Events bubble up, so it never reached the `form` element
that carries the binding (`keydown.ctrl+enter->form#submit
keydown.meta+enter->form#submit`, lib/avo/concerns/form_builder.rb).
It only ever exercised the Save button's `@github/hotkey` "Mod+Enter",
which is document-level but resolves to Meta on macOS and Ctrl on Linux —
so it passed locally with `meta_key: true` and would have failed on CI.
Dispatch from the focused field instead, which tests the real Stimulus
binding and is platform-independent, and cover both modifiers. `fill_in`
leaves focus on `body` under Cuprite, hence the explicit `focus_field`.
Closes AVO-1117
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 2c8fdc6 commit f694b22
1 file changed
Lines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
45 | 53 | | |
46 | 54 | | |
47 | 55 | | |
| |||
299 | 307 | | |
300 | 308 | | |
301 | 309 | | |
302 | | - | |
303 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
304 | 316 | | |
305 | | - | |
| 317 | + | |
306 | 318 | | |
307 | | - | |
308 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
309 | 322 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
314 | 328 | | |
315 | 329 | | |
316 | 330 | | |
| |||
0 commit comments