9
9
assert-text: (".sidebar > .location", "Crate test_docs")
10
10
// In modules, we only have one "location" element.
11
11
assert-count: (".sidebar .location", 1)
12
+ assert-count: (".sidebar h2", 1)
12
13
assert-text: ("#all-types", "All Items")
13
14
assert-css: ("#all-types", {"color": "rgb(53, 109, 164)"})
14
15
// We check that we have the crates list and that the "current" on is "test_docs".
@@ -28,7 +29,8 @@ assert-text: ("#structs + .item-table .item-left > a", "Foo")
28
29
click: "#structs + .item-table .item-left > a"
29
30
30
31
// PAGE: struct.Foo.html
31
- assert-count: (".sidebar .location", 2)
32
+ assert-count: (".sidebar .location", 1)
33
+ assert-count: (".sidebar h2", 2)
32
34
// We check that there is no crate listed outside of the top level.
33
35
assert-false: ".sidebar-elems > .crate"
34
36
@@ -60,10 +62,11 @@ assert-text: ("#functions + .item-table .item-left > a", "foobar")
60
62
click: "#functions + .item-table .item-left > a"
61
63
62
64
// PAGE: fn.foobar.html
63
- // In items containing no items (like functions or constants) and in modules, we have one
64
- // "location" elements.
65
- assert-count: (".sidebar .location", 1)
66
- assert-text: (".sidebar .sidebar-elems .location", "In lib2")
65
+ // In items containing no items (like functions or constants) and in modules, we have no
66
+ // "location" elements. Only the parent module h2.
67
+ assert-count: (".sidebar .location", 0)
68
+ assert-count: (".sidebar h2", 1)
69
+ assert-text: (".sidebar .sidebar-elems h2", "In lib2")
67
70
// We check that we don't have the crate list.
68
71
assert-false: ".sidebar-elems > .crate"
69
72
0 commit comments