Add GUI regression test for setting's cog color
This commit is contained in:
parent
0cbebd07ee
commit
e460901b13
31
tests/rustdoc-gui/settings-button.goml
Normal file
31
tests/rustdoc-gui/settings-button.goml
Normal file
@ -0,0 +1,31 @@
|
||||
// This test ensures that the icon of the settings button looks as expected on
|
||||
// all themes.
|
||||
include: "utils.goml"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
show-text: true
|
||||
|
||||
define-function: (
|
||||
"check-image",
|
||||
[theme, filter],
|
||||
block {
|
||||
call-function: ("switch-theme", {"theme": |theme|})
|
||||
assert-css: ("#settings-menu > a::before", {
|
||||
"filter": |filter|,
|
||||
"width": "22px",
|
||||
"height": "22px",
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
call-function: ("check-image", {
|
||||
"theme": "ayu",
|
||||
"filter": "invert(1)",
|
||||
})
|
||||
call-function: ("check-image", {
|
||||
"theme": "dark",
|
||||
"filter": "none",
|
||||
})
|
||||
call-function: ("check-image", {
|
||||
"theme": "light",
|
||||
"filter": "none",
|
||||
})
|
@ -1,6 +1,5 @@
|
||||
// This test ensures that the settings menu display is working as expected and that
|
||||
// the settings page is also rendered as expected.
|
||||
include: "utils.goml"
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||
show-text: true // needed when we check for colors below.
|
||||
// First, we check that the settings page doesn't exist.
|
||||
|
Loading…
Reference in New Issue
Block a user