diff options
| author | bors <bors@rust-lang.org> | 2022-12-28 17:00:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-28 17:00:00 +0000 |
| commit | 270c94e484e19764a2832ef918c95224eb3f17c7 (patch) | |
| tree | 8806a01d1ba3dd96bcee4cc7a6eb780b850a12fd /src/test/rustdoc-gui/sidebar-source-code.goml | |
| parent | 83a28ef095ba4179a63196f16eadd97f110d6cb3 (diff) | |
| parent | d37cb3ff8935a9d28aa2fdcba2b464bbda96213d (diff) | |
| download | rust-270c94e484e19764a2832ef918c95224eb3f17c7.tar.gz rust-270c94e484e19764a2832ef918c95224eb3f17c7.zip | |
Auto merge of #106215 - matthiaskrgr:rollup-53r89ww, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #106028 (docs/test: add UI test and long-form error docs for `E0461`) - #106172 (Suggest `impl Iterator` when possible for `_` return type) - #106173 (Deduplicate `op` methods) - #106176 (Recover `fn` keyword as `Fn` trait in bounds) - #106194 (rustdoc: combine common sidebar background color CSS rules) - #106199 (Silence knock-down errors on `[type error]` bindings) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc-gui/sidebar-source-code.goml')
| -rw-r--r-- | src/test/rustdoc-gui/sidebar-source-code.goml | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/src/test/rustdoc-gui/sidebar-source-code.goml b/src/test/rustdoc-gui/sidebar-source-code.goml index 36e4d555b8e..d5f57ed6102 100644 --- a/src/test/rustdoc-gui/sidebar-source-code.goml +++ b/src/test/rustdoc-gui/sidebar-source-code.goml @@ -1,7 +1,52 @@ // The goal of this test is to ensure that the sidebar is working as expected in the source // code pages. goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html" -// First: desktop mode. +show-text: true + +// First, check the sidebar colors. +define-function: ( + "check-colors", + (theme, color, background_color), + [ + ("local-storage", { + "rustdoc-theme": |theme|, + "rustdoc-use-system-theme": "false", + }), + ("reload"), + // Checking results colors. + ("assert-css", (".source .sidebar", { + "color": |color|, + "background-color": |background_color| + }, ALL)), + ], +) + +call-function: ( + "check-colors", + { + "theme": "ayu", + "color": "rgb(197, 197, 197)", + "background_color": "rgb(20, 25, 31)", + } +) +call-function: ( + "check-colors", + { + "theme": "dark", + "color": "rgb(221, 221, 221)", + "background_color": "rgb(80, 80, 80)", + } +) +call-function: ( + "check-colors", + { + "theme": "light", + "color": "rgb(0, 0, 0)", + "background_color": "rgb(245, 245, 245)", + } +) + +// Next, desktop mode layout. size: (1100, 800) // We check that the sidebar isn't expanded and has the expected width. assert-css: ("nav.sidebar", {"width": "50px"}) |
