From 61922fe789c38d666e169aee471130b6abc10cbe Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 30 Aug 2021 16:47:17 +0200 Subject: Add tests for implementors associated types display --- src/test/rustdoc-gui/toggle-implementors.goml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/test/rustdoc-gui/toggle-implementors.goml (limited to 'src/test/rustdoc-gui/toggle-implementors.goml') diff --git a/src/test/rustdoc-gui/toggle-implementors.goml b/src/test/rustdoc-gui/toggle-implementors.goml new file mode 100644 index 00000000000..4b2a266c712 --- /dev/null +++ b/src/test/rustdoc-gui/toggle-implementors.goml @@ -0,0 +1,13 @@ +// This test ensures two things: +// +// 1. The implementors toggle are not open by default. +// 2. The "auto-collapse-implementors" setting is working as expected. +goto: file://|DOC_PATH|/implementors/trait.Whatever.html + +// First, checking that they are not open by default. +assert-attribute-false: ("#implementors-list > details", {"open": ""}, ALL) + +// Second, checking "auto-collapse-implementors" setting. +local-storage: {"rustdoc-auto-collapse-implementors": false} +reload: +assert-attribute: ("#implementors-list > details", {"open": ""}, ALL) -- cgit 1.4.1-3-g733a5 From 3a3bf5f1bae06e6cacf2b588a671b15fa796efff Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 1 Sep 2021 20:34:51 +0200 Subject: Remove implementors setting --- src/librustdoc/html/render/mod.rs | 1 - src/librustdoc/html/static/js/main.js | 5 ----- src/test/rustdoc-gui/toggle-implementors.goml | 11 +---------- 3 files changed, 1 insertion(+), 16 deletions(-) (limited to 'src/test/rustdoc-gui/toggle-implementors.goml') diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 864af075245..fab7440817c 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -451,7 +451,6 @@ fn settings(root_path: &str, suffix: &str, themes: &[StylePath]) -> Result details", {"open": ""}, ALL) - -// Second, checking "auto-collapse-implementors" setting. -local-storage: {"rustdoc-auto-collapse-implementors": false} -reload: -assert-attribute: ("#implementors-list > details", {"open": ""}, ALL) -- cgit 1.4.1-3-g733a5