@@ -6,23 +6,28 @@ write: (".search-input", "test")
6
6
wait-for: "#search h1" // The search element is empty before the first search
7
7
assert-attribute: ("#search", {"class": "content"})
8
8
assert-attribute: ("#main-content", {"class": "content hidden"})
9
+ assert-document-property: ({"URL": "index.html?search=test"}, ENDS_WITH)
9
10
press-key: "Escape"
10
11
assert-attribute: ("#search", {"class": "content hidden"})
11
12
assert-attribute: ("#main-content", {"class": "content"})
13
+ assert-document-property: ({"URL": "index.html"}, [ENDS_WITH])
12
14
13
15
// Check that focusing the search input brings back the search results
14
16
focus: ".search-input"
15
17
assert-attribute: ("#search", {"class": "content"})
16
18
assert-attribute: ("#main-content", {"class": "content hidden"})
19
+ assert-document-property: ({"URL": "index.html?search=test"}, ENDS_WITH)
17
20
18
21
// Now let's check that when the help popup is displayed and we press Escape, it doesn't
19
22
// hide the search results too.
20
23
click: "#help-button"
24
+ assert-document-property: ({"URL": "index.html?search=test"}, [ENDS_WITH])
21
25
assert-attribute: ("#help", {"class": ""})
22
26
press-key: "Escape"
23
27
assert-attribute: ("#help", {"class": "hidden"})
24
28
assert-attribute: ("#search", {"class": "content"})
25
29
assert-attribute: ("#main-content", {"class": "content hidden"})
30
+ assert-document-property: ({"URL": "index.html?search=test"}, [ENDS_WITH])
26
31
27
32
// Check that Escape hides the search results when a search result is focused.
28
33
focus: ".search-input"
0 commit comments