11// ignore-tidy-linelength
2+ include: "utils.goml"
23
34// Checks that the search tab result tell the user about corrections
45// First, try a search-by-name
56go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
6- click: "#search-button"
7- wait-for: ".search-input"
8- // Intentionally wrong spelling of "NotableStructWithLongName"
9- write-into: (".search-input", "NotableStructWithLongNamr")
10- // To be SURE that the search will be run.
11- press-key: 'Enter'
12- // Waiting for the search results to appear...
13- wait-for: "#search-tabs"
14- wait-for-false: "#search-tabs .count.loading"
7+ call-function: ("perform-search", {"query": "NotableStructWithLongNamr"})
158
169// Corrections aren't shown on the "In Names" tab.
1710assert: "#search-tabs button.selected:first-child"
@@ -35,15 +28,7 @@ assert-text: (
3528
3629// Now, explicit return values
3730go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
38- click: "#search-button"
39- wait-for: ".search-input"
40- // Intentionally wrong spelling of "NotableStructWithLongName"
41- write-into: (".search-input", "-> NotableStructWithLongNamr")
42- // To be SURE that the search will be run.
43- press-key: 'Enter'
44- // Waiting for the search results to appear...
45- wait-for: "#search-tabs"
46- wait-for-false: "#search-tabs .count.loading"
31+ call-function: ("perform-search", {"query": "-> NotableStructWithLongNamr"})
4732
4833assert-text: (
4934 ".search-results.active .search-corrections",
@@ -52,15 +37,7 @@ assert-text: (
5237
5338// Now, generic correction
5439go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
55- click: "#search-button"
56- wait-for: ".search-input"
57- // Intentionally wrong spelling of "NotableStructWithLongName"
58- write-into: (".search-input", "NotableStructWithLongNamr, NotableStructWithLongNamr")
59- // To be SURE that the search will be run.
60- press-key: 'Enter'
61- // Waiting for the search results to appear...
62- wait-for: "#search-tabs"
63- wait-for-false: "#search-tabs .count.loading"
40+ call-function: ("perform-search", {"query": "NotableStructWithLongNamr, NotableStructWithLongNamr"})
6441
6542assert-text: (
6643 ".search-failed.active .search-corrections",
@@ -69,31 +46,15 @@ assert-text: (
6946
7047// Now, generic correction plus error
7148go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
72- click: "#search-button"
73- wait-for: ".search-input"
74- // Intentionally wrong spelling of "NotableStructWithLongName"
75- write-into: (".search-input", "Foo<NotableStructWithLongNamr>,y")
76- // To be SURE that the search will be run.
77- press-key: 'Enter'
78- // Waiting for the search results to appear...
79- wait-for: "#search-tabs"
80- wait-for-false: "#search-tabs .count.loading"
49+ call-function: ("perform-search", {"query": "Foo<NotableStructWithLongNamr>,y"})
8150
8251assert-text: (
8352 ".search-failed.active .search-corrections",
8453 "Type \"NotableStructWithLongNamr\" not found and used as generic parameter. Consider searching for \"NotableStructWithLongName\" instead."
8554)
8655
8756go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
88- click: "#search-button"
89- wait-for: ".search-input"
90- // Intentionally wrong spelling of "NotableStructWithLongName"
91- write-into: (".search-input", "generic:NotableStructWithLongNamr<x>,y")
92- // To be SURE that the search will be run.
93- press-key: 'Enter'
94- // Waiting for the search results to appear...
95- wait-for: "#search-tabs"
96- wait-for-false: "#search-tabs .count.loading"
57+ call-function: ("perform-search", {"query": "generic:NotableStructWithLongNamr<x>,y"})
9758
9859assert-css: (".error", {
9960 "display": "block"
0 commit comments