Skip to content

Commit 23e957d

Browse files
Add GUI tests for item-info colors
1 parent 31e2e91 commit 23e957d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/test/rustdoc-gui/item-info.goml

+26
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,29 @@ compare-elements-css: (
3030
"#main-content > .item-info .stab:nth-of-type(2)",
3131
["height"],
3232
)
33+
34+
// Now checking the text color and the links color.
35+
show-text: true
36+
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
37+
goto: file://|DOC_PATH|/lib2/trait.Trait.html
38+
39+
assert-css: (".item-info .stab", {"color": "rgb(221, 221, 221)"}, ALL)
40+
assert-css: (".item-info .stab strong", {"color": "rgb(221, 221, 221)"}, ALL)
41+
assert-css: (".item-info .stab span", {"color": "rgb(221, 221, 221)"}, ALL)
42+
assert-css: (".item-info .stab a", {"color": "rgb(221, 221, 221)"}, ALL)
43+
44+
local-storage: {"rustdoc-theme": "ayu"}
45+
reload:
46+
47+
assert-css: (".item-info .stab", {"color": "rgb(197, 197, 197)"}, ALL)
48+
assert-css: (".item-info .stab strong", {"color": "rgb(197, 197, 197)"}, ALL)
49+
assert-css: (".item-info .stab span", {"color": "rgb(197, 197, 197)"}, ALL)
50+
assert-css: (".item-info .stab a", {"color": "rgb(197, 197, 197)"}, ALL)
51+
52+
local-storage: {"rustdoc-theme": "light"}
53+
reload:
54+
55+
assert-css: (".item-info .stab", {"color": "rgb(0, 0, 0)"}, ALL)
56+
assert-css: (".item-info .stab strong", {"color": "rgb(0, 0, 0)"}, ALL)
57+
assert-css: (".item-info .stab span", {"color": "rgb(0, 0, 0)"}, ALL)
58+
assert-css: (".item-info .stab a", {"color": "rgb(0, 0, 0)"}, ALL)

0 commit comments

Comments
 (0)