Add GUI test for item info elements color

This commit is contained in:
Guillaume Gomez 2024-12-28 20:54:00 +01:00
parent 7c002ff9a7
commit 00bf8717e3

View file

@ -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)