fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// This test checks the appearance of the tables in the doc comments. 2go-to: "file://" + |DOC_PATH| + "/test_docs/doc_block_table/struct.DocBlockTable.html#method.func" 3 4compare-elements-css: (".impl-items .docblock table th", ".top-doc .docblock table th", ["border"]) 5compare-elements-css: (".impl-items .docblock table td", ".top-doc .docblock table td", ["border"]) 6 7define-function: ( 8 "check-colors", 9 (theme, border_color, zebra_stripe_color), 10 block { 11 set-local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|} 12 reload: 13 assert-css: (".top-doc .docblock table tbody tr:nth-child(1)", { 14 "background-color": "rgba(0, 0, 0, 0)", 15 }) 16 assert-css: (".top-doc .docblock table tbody tr:nth-child(2)", { 17 "background-color": |zebra_stripe_color|, 18 }) 19 assert-css: (".top-doc .docblock table tbody tr:nth-child(3)", { 20 "background-color": "rgba(0, 0, 0, 0)", 21 }) 22 assert-css: (".top-doc .docblock table tbody tr:nth-child(4)", { 23 "background-color": |zebra_stripe_color|, 24 }) 25 assert-css: (".top-doc .docblock table td", { 26 "border-style": "solid", 27 "border-width": "1px", 28 "border-color": |border_color|, 29 }) 30 assert-css: (".top-doc .docblock table th", { 31 "border-style": "solid", 32 "border-width": "1px", 33 "border-color": |border_color|, 34 }) 35 } 36) 37 38call-function: ("check-colors", { 39 "theme": "ayu", 40 "border_color": "#5c6773", 41 "zebra_stripe_color": "#191f26", 42}) 43call-function: ("check-colors", { 44 "theme": "dark", 45 "border_color": "#e0e0e0", 46 "zebra_stripe_color": "#2a2a2a", 47}) 48call-function: ("check-colors", { 49 "theme": "light", 50 "border_color": "#e0e0e0", 51 "zebra_stripe_color": "#f5f5f5", 52})