rust/src/test/rustdoc-gui/sidebar-links-color.goml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

234 lines
6.8 KiB
Plaintext
Raw Normal View History

2022-09-24 09:31:34 -05:00
// This test checks links colors in sidebar before and after hover.
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
2022-09-24 09:31:34 -05:00
// This is needed so that the text color is computed.
show-text: true
// Ayu theme
local-storage: {
"rustdoc-theme": "ayu",
"rustdoc-use-system-theme": "false",
}
reload:
// Struct
assert-css: (
".sidebar .block.struct a:not(.current)",
2022-09-24 09:31:34 -05:00
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.struct a:not(.current)"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.struct a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
)
// Enum
assert-css: (
".sidebar .block.enum a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.enum a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.enum a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
)
// Union
assert-css: (
".sidebar .block.union a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.union a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.union a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
)
// Trait
assert-css: (
".sidebar .block.trait a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.trait a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.trait a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
)
// Function
assert-css: (
".sidebar .block.fn a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.fn a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.fn a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
)
// Type definition
assert-css: (
".sidebar .block.type a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.type a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.type a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
)
// Keyword
assert-css: (
".sidebar .block.keyword a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.keyword a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.keyword a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
)
// Dark theme
local-storage: {"rustdoc-theme": "dark"}
reload:
// Struct
assert-css: (
".sidebar .block.struct a:not(.current)",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.struct a:not(.current)"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.struct a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
)
// Enum
assert-css: (
".sidebar .block.enum a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.enum a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.enum a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
)
// Union
assert-css: (
".sidebar .block.union a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.union a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.union a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
)
// Trait
assert-css: (
".sidebar .block.trait a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.trait a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.trait a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
)
// Function
assert-css: (
".sidebar .block.fn a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.fn a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.fn a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
)
// Type definition
assert-css: (
".sidebar .block.type a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.type a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.type a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
)
// Keyword
assert-css: (
".sidebar .block.keyword a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.keyword a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.keyword a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
)
// Light theme
local-storage: {"rustdoc-theme": "light"}
reload:
// Struct
assert-css: (
".sidebar .block.struct a:not(.current)",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.struct a:not(.current)"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.struct a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
)
// Enum
assert-css: (
".sidebar .block.enum a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.enum a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.enum a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
)
// Union
assert-css: (
".sidebar .block.union a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.union a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.union a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
)
// Trait
assert-css: (
".sidebar .block.trait a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.trait a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.trait a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
)
// Function
assert-css: (
".sidebar .block.fn a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.fn a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.fn a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
)
// Type definition
assert-css: (
".sidebar .block.type a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.type a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.type a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
)
// Keyword
assert-css: (
".sidebar .block.keyword a",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
)
move-cursor-to: ".sidebar .block.keyword a"
2022-09-24 09:31:34 -05:00
assert-css: (
".sidebar .block.keyword a:hover",
2022-09-24 09:31:34 -05:00
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
)