2022-12-09 11:40:49 -06:00
|
|
|
// All stability badges should have rounded corners and colored backgrounds.
|
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
|
|
|
show-text: true
|
|
|
|
define-function: (
|
2023-01-06 08:18:51 -06:00
|
|
|
"check-badge",
|
|
|
|
(theme, background, color),
|
|
|
|
block {
|
|
|
|
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
|
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
|
|
|
assert: ".docblock .stab"
|
|
|
|
assert: ".item-table .stab"
|
|
|
|
assert-css: (".stab", {
|
|
|
|
"border-radius": "3px",
|
|
|
|
"color": |color|,
|
|
|
|
"background-color": |background|,
|
|
|
|
})
|
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/fn.replaced_function.html"
|
|
|
|
assert: (".item-info .stab")
|
|
|
|
assert-css: (".stab", {
|
|
|
|
"border-radius": "3px",
|
|
|
|
"color": |color|,
|
|
|
|
"background-color": |background|,
|
|
|
|
})
|
|
|
|
},
|
2022-12-09 11:40:49 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
call-function: ("check-badge", {
|
2023-01-06 08:18:51 -06:00
|
|
|
"theme": "ayu",
|
|
|
|
"color": "rgb(197, 197, 197)",
|
|
|
|
"background": "rgb(49, 69, 89)",
|
2022-12-09 11:40:49 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-badge", {
|
2023-01-06 08:18:51 -06:00
|
|
|
"theme": "dark",
|
|
|
|
"color": "rgb(221, 221, 221)",
|
|
|
|
"background": "rgb(49, 69, 89)",
|
2022-12-09 11:40:49 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-badge", {
|
2023-01-06 08:18:51 -06:00
|
|
|
"theme": "light",
|
|
|
|
"color": "rgb(0, 0, 0)",
|
|
|
|
"background": "rgb(255, 245, 214)",
|
2022-12-09 11:40:49 -06:00
|
|
|
})
|