]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/anchors.goml
Rollup merge of #93469 - compiler-errors:issue-93450, r=estebank
[rust.git] / src / test / rustdoc-gui / anchors.goml
1 // This test is to ensure that the anchors (`ยง`) have the expected color and position.
2 goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
3 show-text: true
4
5 // This is needed to ensure that the text color is computed.
6 show-text: true
7
8 // Set the theme to light.
9 local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
10 // We reload the page so the local storage settings are being used.
11 reload:
12
13 assert-css: ("#toggle-all-docs", {"color": "rgb(0, 0, 0)"})
14 assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(0, 0, 0)"})
15 assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(173, 55, 138)"})
16 assert-css: (".srclink", {"color": "rgb(56, 115, 173)"})
17
18 move-cursor-to: ".main-heading .srclink"
19 assert-css: (".srclink", {"text-decoration": "underline solid rgb(56, 115, 173)"})
20
21 assert-css: ("#top-doc-prose-title", {"color": "rgb(0, 0, 0)"})
22
23 assert-css: (".sidebar a", {"color": "rgb(53, 109, 164)"})
24 assert-css: (".in-band a", {"color": "rgb(0, 0, 0)"})
25
26 // We move the cursor over the "Implementations" title so the anchor is displayed.
27 move-cursor-to: "h2#implementations"
28 assert-css: ("h2#implementations a.anchor", {"color": "rgb(0, 0, 0)"})
29
30 // Same thing with the impl block title.
31 move-cursor-to: "#impl"
32 assert-css: ("#impl a.anchor", {"color": "rgb(0, 0, 0)"})
33
34 assert-css: ("#title-for-struct-impl-item-doc", {"margin-left": "0px"})