2022-12-09 17:40:49 +00:00
|
|
|
// All stability badges should have rounded corners and colored backgrounds.
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2022-12-09 17:40:49 +00:00
|
|
|
show-text: true
|
|
|
|
define-function: (
|
2023-01-06 14:18:51 +00:00
|
|
|
"check-badge",
|
|
|
|
(theme, background, color),
|
|
|
|
block {
|
2023-04-11 17:11:34 +00:00
|
|
|
set-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2023-01-06 14:18:51 +00:00
|
|
|
assert: ".docblock .stab"
|
|
|
|
assert: ".item-table .stab"
|
|
|
|
assert-css: (".stab", {
|
|
|
|
"border-radius": "3px",
|
|
|
|
"color": |color|,
|
|
|
|
"background-color": |background|,
|
|
|
|
})
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.replaced_function.html"
|
2023-01-06 14:18:51 +00:00
|
|
|
assert: (".item-info .stab")
|
|
|
|
assert-css: (".stab", {
|
|
|
|
"border-radius": "3px",
|
|
|
|
"color": |color|,
|
|
|
|
"background-color": |background|,
|
|
|
|
})
|
|
|
|
},
|
2022-12-09 17:40:49 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
call-function: ("check-badge", {
|
2023-01-06 14:18:51 +00:00
|
|
|
"theme": "ayu",
|
2023-05-24 12:41:18 +00:00
|
|
|
"color": "#c5c5c5",
|
|
|
|
"background": "#314559",
|
2022-12-09 17:40:49 +00:00
|
|
|
})
|
|
|
|
call-function: ("check-badge", {
|
2023-01-06 14:18:51 +00:00
|
|
|
"theme": "dark",
|
2023-05-24 12:41:18 +00:00
|
|
|
"color": "#ddd",
|
|
|
|
"background": "#314559",
|
2022-12-09 17:40:49 +00:00
|
|
|
})
|
|
|
|
call-function: ("check-badge", {
|
2023-01-06 14:18:51 +00:00
|
|
|
"theme": "light",
|
2023-05-24 12:41:18 +00:00
|
|
|
"color": "black",
|
|
|
|
"background": "#fff5d6",
|
2022-12-09 17:40:49 +00:00
|
|
|
})
|