]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-gui/stab-badge.goml
Rollup merge of #106960 - estebank:parse-anon-enums, r=cjgillot
[rust.git] / tests / rustdoc-gui / stab-badge.goml
1 // All stability badges should have rounded corners and colored backgrounds.
2 goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
3 show-text: true
4 define-function: (
5     "check-badge",
6     (theme, background, color),
7     block {
8         local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
9         goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
10         assert: ".docblock .stab"
11         assert: ".item-table .stab"
12         assert-css: (".stab", {
13             "border-radius": "3px",
14             "color": |color|,
15             "background-color": |background|,
16         })
17         goto: "file://" + |DOC_PATH| + "/test_docs/fn.replaced_function.html"
18         assert: (".item-info .stab")
19         assert-css: (".stab", {
20             "border-radius": "3px",
21             "color": |color|,
22             "background-color": |background|,
23         })
24     },
25 )
26
27 call-function: ("check-badge", {
28     "theme": "ayu",
29     "color": "rgb(197, 197, 197)",
30     "background": "rgb(49, 69, 89)",
31 })
32 call-function: ("check-badge", {
33     "theme": "dark",
34     "color": "rgb(221, 221, 221)",
35     "background": "rgb(49, 69, 89)",
36 })
37 call-function: ("check-badge", {
38     "theme": "light",
39     "color": "rgb(0, 0, 0)",
40     "background": "rgb(255, 245, 214)",
41 })