2022-12-09 17:40:49 +00:00
|
|
|
// All stability badges should have rounded corners and colored backgrounds.
|
2024-04-05 19:38:55 +00:00
|
|
|
include: "utils.goml"
|
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",
|
2024-04-01 19:11:22 +00:00
|
|
|
[theme, background, color],
|
2023-01-06 14:18:51 +00:00
|
|
|
block {
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2024-04-05 19:38:55 +00:00
|
|
|
call-function: ("switch-theme", {"theme": |theme|})
|
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
|
|
|
})
|