Skip to content

Commit

Permalink
Rollup merge of rust-lang#134861 - GuillaumeGomez:item-info-colors, r…
Browse files Browse the repository at this point in the history
…=fmease

Add GUI test for item info elements color

Fixes rust-lang#98341.

r? `@fmease`
  • Loading branch information
Noratrieb authored Dec 31, 2024
2 parents 68c45d2 + 00bf871 commit 7870003
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/rustdoc-gui/item-info.goml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,26 @@ compare-elements-css: (
"#main-content > .item-info .stab:nth-of-type(2)",
["height"],
)

// Now checking the text color and the links color.
show-text: true
include: "utils.goml"
go-to: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"

call-function: ("switch-theme", {"theme": "ayu"})
assert-css: (".item-info .stab", {"color": "rgb(197, 197, 197)"}, ALL)
assert-css: (".item-info .stab strong", {"color": "rgb(197, 197, 197)"}, ALL)
assert-css: (".item-info .stab span", {"color": "rgb(197, 197, 197)"}, ALL)
assert-css: (".item-info .stab a", {"color": "rgb(57, 175, 215)"}, ALL)

call-function: ("switch-theme", {"theme": "dark"})
assert-css: (".item-info .stab", {"color": "rgb(221, 221, 221)"}, ALL)
assert-css: (".item-info .stab strong", {"color": "rgb(221, 221, 221)"}, ALL)
assert-css: (".item-info .stab span", {"color": "rgb(221, 221, 221)"}, ALL)
assert-css: (".item-info .stab a", {"color": "rgb(210, 153, 29)"}, ALL)

call-function: ("switch-theme", {"theme": "light"})
assert-css: (".item-info .stab", {"color": "rgb(0, 0, 0)"}, ALL)
assert-css: (".item-info .stab strong", {"color": "rgb(0, 0, 0)"}, ALL)
assert-css: (".item-info .stab span", {"color": "rgb(0, 0, 0)"}, ALL)
assert-css: (".item-info .stab a", {"color": "rgb(56, 115, 173)"}, ALL)

0 comments on commit 7870003

Please sign in to comment.