2023-04-20 16:32:02 -05:00
|
|
|
// ignore-tidy-linelength
|
|
|
|
|
2023-04-15 13:53:50 -05:00
|
|
|
// Checks that the search tab result tell the user about corrections
|
|
|
|
// First, try a search-by-name
|
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
|
|
|
// Intentionally wrong spelling of "NotableStructWithLongName"
|
|
|
|
write: (".search-input", "NotableStructWithLongNamr")
|
|
|
|
// To be SURE that the search will be run.
|
|
|
|
press-key: 'Enter'
|
|
|
|
// Waiting for the search results to appear...
|
|
|
|
wait-for: "#search-tabs"
|
|
|
|
|
|
|
|
// Corrections aren't shown on the "In Names" tab.
|
|
|
|
assert: "#search-tabs button.selected:first-child"
|
|
|
|
assert-css: (".search-corrections", {
|
|
|
|
"display": "none"
|
|
|
|
})
|
|
|
|
|
|
|
|
// Corrections do get shown on the "In Parameters" tab.
|
|
|
|
click: "#search-tabs button:nth-child(2)"
|
|
|
|
assert: "#search-tabs button.selected:nth-child(2)"
|
|
|
|
assert-css: (".search-corrections", {
|
|
|
|
"display": "block"
|
|
|
|
})
|
|
|
|
assert-text: (
|
|
|
|
".search-corrections",
|
2023-04-20 16:32:02 -05:00
|
|
|
"Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
|
2023-04-15 13:53:50 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// Corrections do get shown on the "In Return Type" tab.
|
|
|
|
click: "#search-tabs button:nth-child(3)"
|
|
|
|
assert: "#search-tabs button.selected:nth-child(3)"
|
|
|
|
assert-css: (".search-corrections", {
|
|
|
|
"display": "block"
|
|
|
|
})
|
|
|
|
assert-text: (
|
|
|
|
".search-corrections",
|
2023-04-20 16:32:02 -05:00
|
|
|
"Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
|
2023-04-15 13:53:50 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// Now, explicit return values
|
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
|
|
|
// Intentionally wrong spelling of "NotableStructWithLongName"
|
|
|
|
write: (".search-input", "-> NotableStructWithLongNamr")
|
|
|
|
// To be SURE that the search will be run.
|
|
|
|
press-key: 'Enter'
|
|
|
|
// Waiting for the search results to appear...
|
|
|
|
wait-for: "#search-tabs"
|
|
|
|
|
|
|
|
assert-css: (".search-corrections", {
|
|
|
|
"display": "block"
|
|
|
|
})
|
|
|
|
assert-text: (
|
|
|
|
".search-corrections",
|
2023-04-20 16:32:02 -05:00
|
|
|
"Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
|
2023-04-15 13:53:50 -05:00
|
|
|
)
|