File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -10,5 +10,21 @@ assert-text: (".top-doc .line-number", "1\n2\n3\n4")
1010assert: ".top-doc .rust-example-rendered span.hidden"
1111assert-text: (".top-doc .rust-example-rendered span.hidden", "fn main() {\n")
1212assert-text: (".methods .line-number", "1\n2\n3\n4\n5\n6\n7")
13+
14+ // Now we check the collapse/expand feature.
15+ assert: ".top-doc .expand"
16+ assert-false: ".top-doc .collapse"
17+ click: ".top-doc .expand"
18+ assert-text: (".top-doc .line-number", "1\n2\n3\n4\n5\n6\n7")
19+ assert: ".top-doc .collapse"
20+ assert-false: ".top-doc .expand"
21+ click: ".top-doc .collapse"
22+ assert-text: (".top-doc .line-number", "1\n2\n3\n4")
23+ assert: ".top-doc .expand"
24+ assert-false: ".top-doc .collapse"
25+ // We now check that the button isn't present if there is no hidden lines.
26+ assert-false: ".methods .expand"
27+ assert-false: ".methods .collapse"
28+
1329// We unset the parameter to be sure it won't affect other tests.
1430local-storage: {"rustdoc-line-numbers": ""}
You can’t perform that action at this time.
0 commit comments