Skip to content

Commit e86331d

Browse files
Fix crash when wait-for-property fails
1 parent f6452af commit e86331d

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/commands/wait.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ function parseWaitForProperty(parser) {
752752
const varValue = varName + 'Value';
753753

754754
const { checks, hasSpecialChecks } = makeExtendedChecks(
755-
enabledChecks, false, 'nonMatchingAttrs', 'property', 'prop', varKey, varValue);
755+
enabledChecks, false, 'nonMatchingProps', 'property', 'prop', varKey, varValue);
756756

757757
let checker;
758758
if (!enabledChecks['ALL']) {
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This test ensures that the `wait-for-property` command is behaving like expected.
2+
go-to: "file://" + |CURRENT_DIR| + "/" + |DOC_PATH| + "/elements.html"
3+
set-timeout: 500
4+
// Try a property with a different type.
5+
// This should give a failure, not an internal error.
6+
wait-for-property: ("html", {"offsetLeft": "0"})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
=> Starting doc-ui tests...
2+
3+
wait-for-property-3... FAILED
4+
[ERROR] (line 6) Error: The following properties still don't match: [expected `0` for property `offsetLeft`, found `0`]: for command `wait-for-property: ("html", {"offsetLeft": "0"})`
5+
6+
7+
<= doc-ui tests done: 0 succeeded, 1 failed

0 commit comments

Comments
 (0)