-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
Switch output test file format to TOML to allow multi-line strings
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
instructions = [ | ||
"""if ((await page.$(\"a\")) === null) { throw '\"a\" not found'; }""", | ||
] | ||
wait = false | ||
checkResult = true |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
instructions = [ | ||
"""if ((await page.$(\"a\")) === null) { throw '\"a\" not found'; }""", | ||
] | ||
wait = false | ||
checkResult = true |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error = """expected a tuple, a CSS selector or an XPath, found `1.1`""" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error = """expected a tuple, a CSS selector or an XPath, found `1`""" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error = """expected `\"` at the end of the string""" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error = """expected only a CSS selector or an XPath in the tuple, found 2 elements""" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error = """expected only a CSS selector or an XPath in the tuple, found 0 elements""" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error = """expected only a CSS selector or an XPath in the tuple, found 2 elements""" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
instructions = [ | ||
"""if ((await page.$x(\"//a\\nhello\")).length === 0) { throw 'XPath \"//a\\nhello\" not found'; }""", | ||
] | ||
wait = false | ||
checkResult = true |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
instructions = [ | ||
"""if ((await page.$x(\"//a\")).length === 0) { throw 'XPath \"//a\" not found'; }""", | ||
] | ||
wait = false | ||
checkResult = true |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error = """XPath must start with `//`""" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
instructions = [ | ||
"""if ((await page.$x(\"//a\")).length === 0) { throw 'XPath \"//a\" not found'; }""", | ||
] | ||
wait = false | ||
checkResult = true |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
instructions = [ | ||
"""let parseAssertElemAttr = await page.$(\"a\"); | ||
if (parseAssertElemAttr === null) { throw '\"a\" not found'; } | ||
await page.evaluate(e => { | ||
const nonMatchingAttrs = []; | ||
const parseAssertElemAttrDict = {\"a\":\"1\"}; | ||
const nullAttributes = []; | ||
for (const attr of nullAttributes) { | ||
if (e.hasAttribute(attr)) { | ||
nonMatchingAttrs.push(\"Expected `null` for attribute `\" + attr + \"`, found: `\" + e.getAttribute(attr) + \"`\"); | ||
continue; | ||
} | ||
} | ||
for (const [parseAssertElemAttrAttribute, parseAssertElemAttrValue] of Object.entries(parseAssertElemAttrDict)) { | ||
if (!e.hasAttribute(parseAssertElemAttrAttribute)) { | ||
nonMatchingAttrs.push(\"No attribute named `\" + parseAssertElemAttrAttribute + \"`\"); | ||
continue; | ||
} | ||
const attr = e.getAttribute(parseAssertElemAttrAttribute); | ||
if (attr !== parseAssertElemAttrValue) { | ||
nonMatchingAttrs.push(\"attribute `\" + parseAssertElemAttrAttribute + \"` isn't equal to `\" + parseAssertElemAttrValue + \"` (`\" + attr + \"`)\"); | ||
} | ||
} | ||
if (nonMatchingAttrs.length !== 0) { | ||
const props = nonMatchingAttrs.join(\", \"); | ||
throw \"The following errors happened (for selector `a`): [\" + props + \"]\"; | ||
} | ||
}, parseAssertElemAttr);""", | ||
] | ||
wait = false | ||
warnings = [ | ||
] | ||
checkResult = true |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
instructions = [ | ||
"""let parseAssertElemAttr = await page.$$(\"a\"); | ||
if (parseAssertElemAttr.length === 0) { throw '\"a\" not found'; } | ||
for (let i = 0, len = parseAssertElemAttr.length; i < len; ++i) { | ||
await page.evaluate(e => { | ||
const nonMatchingAttrs = []; | ||
const parseAssertElemAttrDict = {\"a\":\"1\"}; | ||
const nullAttributes = []; | ||
for (const attr of nullAttributes) { | ||
if (e.hasAttribute(attr)) { | ||
nonMatchingAttrs.push(\"Expected `null` for attribute `\" + attr + \"`, found: `\" + e.getAttribute(attr) + \"`\"); | ||
continue; | ||
} | ||
} | ||
for (const [parseAssertElemAttrAttribute, parseAssertElemAttrValue] of Object.entries(parseAssertElemAttrDict)) { | ||
if (!e.hasAttribute(parseAssertElemAttrAttribute)) { | ||
nonMatchingAttrs.push(\"No attribute named `\" + parseAssertElemAttrAttribute + \"`\"); | ||
continue; | ||
} | ||
const attr = e.getAttribute(parseAssertElemAttrAttribute); | ||
if (attr !== parseAssertElemAttrValue) { | ||
nonMatchingAttrs.push(\"attribute `\" + parseAssertElemAttrAttribute + \"` isn't equal to `\" + parseAssertElemAttrValue + \"` (`\" + attr + \"`)\"); | ||
} | ||
} | ||
if (nonMatchingAttrs.length !== 0) { | ||
const props = nonMatchingAttrs.join(\", \"); | ||
throw \"The following errors happened (for selector `a`): [\" + props + \"]\"; | ||
} | ||
}, parseAssertElemAttr[i]); | ||
}""", | ||
] | ||
wait = false | ||
warnings = [ | ||
] | ||
checkResult = true |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
instructions = [ | ||
"""let parseAssertElemAttr = await page.$(\"a\"); | ||
if (parseAssertElemAttr === null) { throw '\"a\" not found'; } | ||
await page.evaluate(e => { | ||
const nonMatchingAttrs = []; | ||
const parseAssertElemAttrDict = {\"b\":\"c\",\"d\":\"e\"}; | ||
const nullAttributes = []; | ||
for (const attr of nullAttributes) { | ||
if (e.hasAttribute(attr)) { | ||
nonMatchingAttrs.push(\"Expected `null` for attribute `\" + attr + \"`, found: `\" + e.getAttribute(attr) + \"`\"); | ||
continue; | ||
} | ||
} | ||
for (const [parseAssertElemAttrAttribute, parseAssertElemAttrValue] of Object.entries(parseAssertElemAttrDict)) { | ||
if (!e.hasAttribute(parseAssertElemAttrAttribute)) { | ||
nonMatchingAttrs.push(\"No attribute named `\" + parseAssertElemAttrAttribute + \"`\"); | ||
continue; | ||
} | ||
const attr = e.getAttribute(parseAssertElemAttrAttribute); | ||
if (attr !== parseAssertElemAttrValue) { | ||
nonMatchingAttrs.push(\"attribute `\" + parseAssertElemAttrAttribute + \"` isn't equal to `\" + parseAssertElemAttrValue + \"` (`\" + attr + \"`)\"); | ||
} | ||
} | ||
if (nonMatchingAttrs.length !== 0) { | ||
const props = nonMatchingAttrs.join(\", \"); | ||
throw \"The following errors happened (for selector `a`): [\" + props + \"]\"; | ||
} | ||
}, parseAssertElemAttr);""", | ||
] | ||
wait = false | ||
warnings = [ | ||
] | ||
checkResult = true |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
instructions = [ | ||
"""let parseAssertElemAttr = await page.$$(\"a\"); | ||
if (parseAssertElemAttr.length === 0) { throw '\"a\" not found'; } | ||
for (let i = 0, len = parseAssertElemAttr.length; i < len; ++i) { | ||
await page.evaluate(e => { | ||
const nonMatchingAttrs = []; | ||
const parseAssertElemAttrDict = {\"b\":\"c\",\"d\":\"e\"}; | ||
const nullAttributes = []; | ||
for (const attr of nullAttributes) { | ||
if (e.hasAttribute(attr)) { | ||
nonMatchingAttrs.push(\"Expected `null` for attribute `\" + attr + \"`, found: `\" + e.getAttribute(attr) + \"`\"); | ||
continue; | ||
} | ||
} | ||
for (const [parseAssertElemAttrAttribute, parseAssertElemAttrValue] of Object.entries(parseAssertElemAttrDict)) { | ||
if (!e.hasAttribute(parseAssertElemAttrAttribute)) { | ||
nonMatchingAttrs.push(\"No attribute named `\" + parseAssertElemAttrAttribute + \"`\"); | ||
continue; | ||
} | ||
const attr = e.getAttribute(parseAssertElemAttrAttribute); | ||
if (attr !== parseAssertElemAttrValue) { | ||
nonMatchingAttrs.push(\"attribute `\" + parseAssertElemAttrAttribute + \"` isn't equal to `\" + parseAssertElemAttrValue + \"` (`\" + attr + \"`)\"); | ||
} | ||
} | ||
if (nonMatchingAttrs.length !== 0) { | ||
const props = nonMatchingAttrs.join(\", \"); | ||
throw \"The following errors happened (for selector `a`): [\" + props + \"]\"; | ||
} | ||
}, parseAssertElemAttr[i]); | ||
}""", | ||
] | ||
wait = false | ||
warnings = [ | ||
] | ||
checkResult = true |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
instructions = [ | ||
"""let parseAssertElemAttr = await page.$(\"a\"); | ||
if (parseAssertElemAttr === null) { throw '\"a\" not found'; } | ||
await page.evaluate(e => { | ||
const nonMatchingAttrs = []; | ||
const parseAssertElemAttrDict = {}; | ||
const nullAttributes = []; | ||
for (const attr of nullAttributes) { | ||
if (e.hasAttribute(attr)) { | ||
nonMatchingAttrs.push(\"Expected `null` for attribute `\" + attr + \"`, found: `\" + e.getAttribute(attr) + \"`\"); | ||
continue; | ||
} | ||
} | ||
for (const [parseAssertElemAttrAttribute, parseAssertElemAttrValue] of Object.entries(parseAssertElemAttrDict)) { | ||
if (!e.hasAttribute(parseAssertElemAttrAttribute)) { | ||
nonMatchingAttrs.push(\"No attribute named `\" + parseAssertElemAttrAttribute + \"`\"); | ||
continue; | ||
} | ||
const attr = e.getAttribute(parseAssertElemAttrAttribute); | ||
if (attr !== parseAssertElemAttrValue) { | ||
nonMatchingAttrs.push(\"attribute `\" + parseAssertElemAttrAttribute + \"` isn't equal to `\" + parseAssertElemAttrValue + \"` (`\" + attr + \"`)\"); | ||
} | ||
} | ||
if (nonMatchingAttrs.length !== 0) { | ||
const props = nonMatchingAttrs.join(\", \"); | ||
throw \"The following errors happened (for selector `a`): [\" + props + \"]\"; | ||
} | ||
}, parseAssertElemAttr);""", | ||
] | ||
wait = false | ||
warnings = [ | ||
] | ||
checkResult = true |