Skip to content

Commit 63d5b72

Browse files
authored
Rollup merge of #134861 - GuillaumeGomez:item-info-colors, r=fmease
Add GUI test for item info elements color Fixes #98341. r? ``@fmease``
2 parents 3d3d898 + 00bf871 commit 63d5b72

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/rustdoc-gui/item-info.goml

+23
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,26 @@ compare-elements-css: (
4545
"#main-content > .item-info .stab:nth-of-type(2)",
4646
["height"],
4747
)
48+
49+
// Now checking the text color and the links color.
50+
show-text: true
51+
include: "utils.goml"
52+
go-to: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
53+
54+
call-function: ("switch-theme", {"theme": "ayu"})
55+
assert-css: (".item-info .stab", {"color": "rgb(197, 197, 197)"}, ALL)
56+
assert-css: (".item-info .stab strong", {"color": "rgb(197, 197, 197)"}, ALL)
57+
assert-css: (".item-info .stab span", {"color": "rgb(197, 197, 197)"}, ALL)
58+
assert-css: (".item-info .stab a", {"color": "rgb(57, 175, 215)"}, ALL)
59+
60+
call-function: ("switch-theme", {"theme": "dark"})
61+
assert-css: (".item-info .stab", {"color": "rgb(221, 221, 221)"}, ALL)
62+
assert-css: (".item-info .stab strong", {"color": "rgb(221, 221, 221)"}, ALL)
63+
assert-css: (".item-info .stab span", {"color": "rgb(221, 221, 221)"}, ALL)
64+
assert-css: (".item-info .stab a", {"color": "rgb(210, 153, 29)"}, ALL)
65+
66+
call-function: ("switch-theme", {"theme": "light"})
67+
assert-css: (".item-info .stab", {"color": "rgb(0, 0, 0)"}, ALL)
68+
assert-css: (".item-info .stab strong", {"color": "rgb(0, 0, 0)"}, ALL)
69+
assert-css: (".item-info .stab span", {"color": "rgb(0, 0, 0)"}, ALL)
70+
assert-css: (".item-info .stab a", {"color": "rgb(56, 115, 173)"}, ALL)

0 commit comments

Comments
 (0)