99assert-text: (".sidebar > .location", "Crate test_docs")
1010// In modules, we only have one "location" element.
1111assert-count: (".sidebar .location", 1)
12+ assert-count: (".sidebar h2", 1)
1213assert-text: ("#all-types", "All Items")
1314assert-css: ("#all-types", {"color": "rgb(53, 109, 164)"})
1415// 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")
2829click: "#structs + .item-table .item-left > a"
2930
3031// PAGE: struct.Foo.html
31- assert-count: (".sidebar .location", 2)
32+ assert-count: (".sidebar .location", 1)
33+ assert-count: (".sidebar h2", 2)
3234// We check that there is no crate listed outside of the top level.
3335assert-false: ".sidebar-elems > .crate"
3436
@@ -60,10 +62,11 @@ assert-text: ("#functions + .item-table .item-left > a", "foobar")
6062click: "#functions + .item-table .item-left > a"
6163
6264// 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")
6770// We check that we don't have the crate list.
6871assert-false: ".sidebar-elems > .crate"
6972
0 commit comments