summary refs log tree commit diff
path: root/tests/rustdoc-gui/settings-button.goml
blob: c38a537e047826d887847aadddc77db3df285d52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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",
})