Commit e9a5406
committed
test: fail fast when the DOM stub cannot find the confirm button
The stub auto-clicks the confirm button so customConfirm() resolves
headlessly, but had no branch for "did not match". A reworded button would
leave the client waiting forever and node would run to the caller's 120s
subprocess timeout, surfacing as TimeoutExpired with a traceback - a
multi-minute mystery instead of a diagnosis.
Report and exit non-zero instead, naming the buttons that were seen and
where to update the pattern. The branch is guarded on there being buttons at
all: the ordinary error-path dialog has none, and firing on that would break
every capture.
Also correct what the predicate's comments claim. The two false-lead patterns
name the regression that already happened; they are not what makes the guard
general. Any substitution displaces the server's own text, so the server-body
clause is what catches a reworded revival - the patterns alone would not.1 parent e8fffa9 commit e9a5406
2 files changed
Lines changed: 26 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| |||
0 commit comments