Commit bda3b6e
fix: Uncheck action is never generated in browser test scripts
CheckExpression.checked was typed as Expression (an IR AST node object)
but used in a boolean context to decide between 'check' and 'uncheck'
method names. Since an object is always truthy, the uncheck branch was
unreachable and locator.uncheck() was never emitted in generated scripts.
Change CheckExpression.checked from Expression to boolean so the
ternary in emitCheckExpression works correctly. Update the intermediate
emitter to pass the boolean directly and fix the variable substitution
pass to preserve the boolean instead of calling substituteExpression.
The test snapshot for uncheck-element was also wrong (showed .check()
instead of .uncheck()), confirming the bug existed since the snapshot
was first captured.
Co-authored-by: Edgar Fisher <e-fisher@users.noreply.github.com>1 parent 555be75 commit bda3b6e
File tree
4 files changed
+4
-7
lines changed- src/codegen/browser
- __snapshots__/browser
- intermediate
4 files changed
+4
-7
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 246 | + | |
250 | 247 | | |
251 | 248 | | |
252 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
0 commit comments