2024-03-27 08:19:17 -05:00
|
|
|
// Check that the targeted element has the expected styles.
|
2024-04-05 14:38:55 -05:00
|
|
|
include: "utils.goml"
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html#method.a_method"
|
2022-11-08 14:12:41 -06:00
|
|
|
show-text: true
|
|
|
|
|
|
|
|
// Confirming that the method is the target.
|
|
|
|
assert: "#method\.a_method:target"
|
|
|
|
|
|
|
|
define-function: (
|
|
|
|
"check-style",
|
2024-04-01 14:11:22 -05:00
|
|
|
[theme, background, border],
|
2023-01-06 08:18:51 -06:00
|
|
|
block {
|
2024-04-05 14:38:55 -05:00
|
|
|
call-function: ("switch-theme", {"theme": |theme|})
|
2024-08-19 18:16:34 -05:00
|
|
|
wait-for-css: ("#method\.a_method:target", {
|
2022-11-08 14:12:41 -06:00
|
|
|
"background-color": |background|,
|
|
|
|
"border-right": "3px solid " + |border|,
|
2023-01-06 08:18:51 -06:00
|
|
|
})
|
|
|
|
},
|
2022-11-08 14:12:41 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
call-function: ("check-style", {
|
|
|
|
"theme": "ayu",
|
|
|
|
"background": "rgba(255, 236, 164, 0.06)",
|
|
|
|
"border": "rgba(255, 180, 76, 0.85)",
|
|
|
|
})
|
|
|
|
call-function: ("check-style", {
|
|
|
|
"theme": "dark",
|
2023-05-29 09:03:56 -05:00
|
|
|
"background": "#494a3d",
|
|
|
|
"border": "#bb7410",
|
2022-11-08 14:12:41 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-style", {
|
|
|
|
"theme": "light",
|
2023-05-29 09:03:56 -05:00
|
|
|
"background": "#fdffd3",
|
|
|
|
"border": "#ad7c37",
|
2022-11-08 14:12:41 -06:00
|
|
|
})
|