Add GUI regression test for setting's cog color

This commit is contained in:
Guillaume Gomez 2024-05-05 19:28:31 +02:00
parent 0cbebd07ee
commit e460901b13
2 changed files with 31 additions and 1 deletions

View 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",
})

View File

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