@@ -6,23 +6,28 @@ write: (".search-input", "test")
66wait-for: "#search h1" // The search element is empty before the first search
77assert-attribute: ("#search", {"class": "content"})
88assert-attribute: ("#main-content", {"class": "content hidden"})
9+ assert-document-property: ({"URL": "index.html?search=test"}, ENDS_WITH)
910press-key: "Escape"
1011assert-attribute: ("#search", {"class": "content hidden"})
1112assert-attribute: ("#main-content", {"class": "content"})
13+ assert-document-property: ({"URL": "index.html"}, [ENDS_WITH])
1214
1315// Check that focusing the search input brings back the search results
1416focus: ".search-input"
1517assert-attribute: ("#search", {"class": "content"})
1618assert-attribute: ("#main-content", {"class": "content hidden"})
19+ assert-document-property: ({"URL": "index.html?search=test"}, ENDS_WITH)
1720
1821// Now let's check that when the help popup is displayed and we press Escape, it doesn't
1922// hide the search results too.
2023click: "#help-button"
24+ assert-document-property: ({"URL": "index.html?search=test"}, [ENDS_WITH])
2125assert-attribute: ("#help", {"class": ""})
2226press-key: "Escape"
2327assert-attribute: ("#help", {"class": "hidden"})
2428assert-attribute: ("#search", {"class": "content"})
2529assert-attribute: ("#main-content", {"class": "content hidden"})
30+ assert-document-property: ({"URL": "index.html?search=test"}, [ENDS_WITH])
2631
2732// Check that Escape hides the search results when a search result is focused.
2833focus: ".search-input"
0 commit comments