]> git.proxmox.com Git - rustc.git/blob - tests/rustdoc-gui/stab-badge.goml
New upstream version 1.71.1+dfsg1
[rustc.git] / tests / rustdoc-gui / stab-badge.goml
1 // All stability badges should have rounded corners and colored backgrounds.
2 go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
3 show-text: true
4 define-function: (
5 "check-badge",
6 (theme, background, color),
7 block {
8 set-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
9 go-to: "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 go-to: "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": "#c5c5c5",
30 "background": "#314559",
31 })
32 call-function: ("check-badge", {
33 "theme": "dark",
34 "color": "#ddd",
35 "background": "#314559",
36 })
37 call-function: ("check-badge", {
38 "theme": "light",
39 "color": "black",
40 "background": "#fff5d6",
41 })