fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// Test to check that the "warning blocks" are displayed as expected. 2go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html" 3show-text: true 4 5define-function: ( 6 "check-warning", 7 (theme, color, border_color), 8 block { 9 set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} 10 reload: 11 12 // The IDs are added directly into the DOM to make writing this test easier. 13 assert-css: ("#doc-warning-1", { 14 "margin-bottom": "12px", 15 "color": |color|, 16 "border-left": "2px solid " + |border_color|, 17 "background-color": "transparent", 18 }) 19 assert-css: ("#doc-warning-2", { 20 "margin-bottom": "0px", 21 "color": |color|, 22 "border-left": "2px solid " + |border_color|, 23 "background-color": "transparent", 24 }) 25 }, 26) 27 28call-function: ("check-warning", { 29 "theme": "ayu", 30 "color": "#c5c5c5", 31 "border_color": "#ff8e00", 32}) 33call-function: ("check-warning", { 34 "theme": "dark", 35 "color": "#ddd", 36 "border_color": "#ff8e00", 37}) 38call-function: ("check-warning", { 39 "theme": "light", 40 "color": "black", 41 "border_color": "#ff8e00", 42})