about summary refs log tree commit diff
path: root/src/test/rustdoc-gui
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-05-31 11:51:22 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2021-05-31 15:20:45 +0200
commita2ba9ef1ff363341bae9a9ced37f14fee68538ec (patch)
tree0bea906b4ffb920bf69bb79272d208791547ddfc /src/test/rustdoc-gui
parente081cd48f47a5d09cd3a8e03ead8890dbf69c176 (diff)
downloadrust-a2ba9ef1ff363341bae9a9ced37f14fee68538ec.tar.gz
rust-a2ba9ef1ff363341bae9a9ced37f14fee68538ec.zip
Only list crates on the crate page
Diffstat (limited to 'src/test/rustdoc-gui')
-rw-r--r--src/test/rustdoc-gui/sidebar.goml15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/test/rustdoc-gui/sidebar.goml b/src/test/rustdoc-gui/sidebar.goml
index 7e6b8a9b965..5149b933162 100644
--- a/src/test/rustdoc-gui/sidebar.goml
+++ b/src/test/rustdoc-gui/sidebar.goml
@@ -17,12 +17,11 @@ click: "#structs + table td > a"
 
 // PAGE: struct.Foo.html
 assert: (".sidebar .location", 2)
-// We check that we have the crates list and that the "current" on is still "test_docs".
-assert: (".sidebar-elems > .crate > ul > li > a.current", "test_docs")
-// We now move to the other crate to check if its submodules have the correct sidebar elements too.
-click: ".sidebar-elems > .crate > ul > li:first-child > a"
+// We check that there is no crate listed outside of the top level.
+assert-false: ".sidebar-elems > .crate"
 
 // PAGE: lib2/index.html
+goto: file://|DOC_PATH|/lib2/index.html
 assert: (".sidebar > .location", "Crate lib2")
 // We check that we have the crates list and that the "current" on is now "lib2".
 assert: (".sidebar-elems > .crate > ul > li > a.current", "lib2")
@@ -36,12 +35,12 @@ click: "#functions + table td > a"
 // In items containing no items (like functions or constants) and in modules, we have one
 // "location" elements.
 assert: (".sidebar .location", 1)
-// We check that we still have the crates list and that the "current" on is still "lib2".
-assert: (".sidebar-elems > .crate > ul > li > a.current", "lib2")
+// We check that we don't have the crate list.
+assert-false: ".sidebar-elems > .crate"
 goto: ./module/sub_module/sub_sub_module/index.html
 
 assert: (".sidebar > .location", "Module sub_sub_module")
-assert: (".sidebar-elems > .crate > ul > li:nth-child(2) > a", "test_docs")
-assert: (".sidebar-elems > .crate > ul > li:nth-child(2) > a", "href", "../../../../test_docs/index.html")
+// We check that we don't have the crate list.
+assert-false: ".sidebar-elems > .crate"
 assert: (".sidebar-elems > .items > ul > li:nth-child(1)", "Functions")
 assert: ("#functions + table td > a", "foo")