2022-12-09 11:40:49 -06:00
|
|
|
// All stability badges should have rounded corners and colored backgrounds.
|
2024-04-05 14:38:55 -05:00
|
|
|
include: "utils.goml"
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2022-12-09 11:40:49 -06:00
|
|
|
show-text: true
|
|
|
|
define-function: (
|
2023-01-06 08:18:51 -06:00
|
|
|
"check-badge",
|
2024-04-01 14:11:22 -05:00
|
|
|
[theme, background, color],
|
2023-01-06 08:18:51 -06:00
|
|
|
block {
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2024-04-05 14:38:55 -05:00
|
|
|
call-function: ("switch-theme", {"theme": |theme|})
|
2023-01-06 08:18:51 -06:00
|
|
|
assert: ".docblock .stab"
|
|
|
|
assert: ".item-table .stab"
|
|
|
|
assert-css: (".stab", {
|
|
|
|
"border-radius": "3px",
|
|
|
|
"color": |color|,
|
|
|
|
"background-color": |background|,
|
|
|
|
})
|
2023-04-11 12:11:34 -05:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.replaced_function.html"
|
2023-01-06 08:18:51 -06:00
|
|
|
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",
|
2023-05-24 07:41:18 -05:00
|
|
|
"color": "#c5c5c5",
|
|
|
|
"background": "#314559",
|
2022-12-09 11:40:49 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-badge", {
|
2023-01-06 08:18:51 -06:00
|
|
|
"theme": "dark",
|
2023-05-24 07:41:18 -05:00
|
|
|
"color": "#ddd",
|
|
|
|
"background": "#314559",
|
2022-12-09 11:40:49 -06:00
|
|
|
})
|
|
|
|
call-function: ("check-badge", {
|
2023-01-06 08:18:51 -06:00
|
|
|
"theme": "light",
|
2023-05-24 07:41:18 -05:00
|
|
|
"color": "black",
|
|
|
|
"background": "#fff5d6",
|
2022-12-09 11:40:49 -06:00
|
|
|
})
|