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