11goto: file://|DOC_PATH|/test_docs/index.html
2- assert: (".sidebar > .location", "Crate test_docs")
2+ assert-text : (".sidebar > .location", "Crate test_docs")
33// In modules, we only have one "location" element.
4- assert: (".sidebar .location", 1)
5- assert: (".sidebar-elems > #all-types", "See all test_docs's items")
4+ assert-count : (".sidebar .location", 1)
5+ assert-text : (".sidebar-elems > #all-types", "See all test_docs's items")
66// We check that we have the crates list and that the "current" on is "test_docs".
7- assert: (".sidebar-elems > .crate > ul > li > a.current", "test_docs")
7+ assert-text : (".sidebar-elems > .crate > ul > li > a.current", "test_docs")
88// And we're also supposed to have the list of items in the current module.
9- assert: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules")
10- assert: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs")
11- assert: (".sidebar-elems > .items > ul > li:nth-child(3)", "Enums")
12- assert: (".sidebar-elems > .items > ul > li:nth-child(4)", "Traits")
13- assert: (".sidebar-elems > .items > ul > li:nth-child(5)", "Functions")
14- assert: (".sidebar-elems > .items > ul > li:nth-child(6)", "Type Definitions")
15- assert: (".sidebar-elems > .items > ul > li:nth-child(7)", "Keywords")
16- assert: ("#structs + table td > a", "Foo")
9+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules")
10+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs")
11+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(3)", "Enums")
12+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(4)", "Traits")
13+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(5)", "Functions")
14+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(6)", "Type Definitions")
15+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(7)", "Keywords")
16+ assert-text : ("#structs + table td > a", "Foo")
1717click: "#structs + table td > a"
1818
1919// PAGE: struct.Foo.html
20- assert: (".sidebar .location", 2)
20+ assert-count : (".sidebar .location", 2)
2121// We check that there is no crate listed outside of the top level.
2222assert-false: ".sidebar-elems > .crate"
2323// We now go back to the crate page to click on the "lib2" crate link.
@@ -26,35 +26,35 @@ click: ".sidebar-elems > .crate > ul > li:first-child > a"
2626
2727// PAGE: lib2/index.html
2828goto: file://|DOC_PATH|/lib2/index.html
29- assert: (".sidebar > .location", "Crate lib2")
29+ assert-text : (".sidebar > .location", "Crate lib2")
3030// We check that we have the crates list and that the "current" on is now "lib2".
31- assert: (".sidebar-elems > .crate > ul > li > a.current", "lib2")
31+ assert-text : (".sidebar-elems > .crate > ul > li > a.current", "lib2")
3232// We now go to the "foobar" function page.
33- assert: (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules")
34- assert: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs")
35- assert: (".sidebar-elems > .items > ul > li:nth-child(3)", "Traits")
36- assert: (".sidebar-elems > .items > ul > li:nth-child(4)", "Functions")
37- assert: (".sidebar-elems > .items > ul > li:nth-child(5)", "Type Definitions")
38- assert: ("#functions + table td > a", "foobar")
33+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(1)", "Modules")
34+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs")
35+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(3)", "Traits")
36+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(4)", "Functions")
37+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(5)", "Type Definitions")
38+ assert-text: ("#functions + table td > a", "foobar")
3939click: "#functions + table td > a"
4040
4141// PAGE: fn.foobar.html
4242// In items containing no items (like functions or constants) and in modules, we have one
4343// "location" elements.
44- assert: (".sidebar .location", 1)
44+ assert-count : (".sidebar .location", 1)
4545// There is a "<br>" tag between "in" and "lib2", but it doesn't count as a space.
46- assert: (".sidebar .sidebar-elems .location", "Other items inlib2")
46+ assert-text : (".sidebar .sidebar-elems .location", "Other items inlib2")
4747// We check that we don't have the crate list.
4848assert-false: ".sidebar-elems > .crate"
4949
5050goto: ./module/index.html
51- assert: (".sidebar > .location", "Module module")
51+ assert-text : (".sidebar > .location", "Module module")
5252// We check that we don't have the crate list.
5353assert-false: ".sidebar-elems > .crate"
5454
5555goto: ./sub_module/sub_sub_module/index.html
56- assert: (".sidebar > .location", "Module sub_sub_module")
56+ assert-text : (".sidebar > .location", "Module sub_sub_module")
5757// We check that we don't have the crate list.
5858assert-false: ".sidebar-elems > .crate"
59- assert: (".sidebar-elems > .items > ul > li:nth-child(1)", "Functions")
60- assert: ("#functions + table td > a", "foo")
59+ assert-text : (".sidebar-elems > .items > ul > li:nth-child(1)", "Functions")
60+ assert-text : ("#functions + table td > a", "foo")
0 commit comments