fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// Example code blocks sometimes have a "Run" button to run them on the 2// Playground. That button is hidden until the user hovers over the code block. 3// This test checks that it is hidden, and that it shows on hover. It also 4// checks for its color. 5go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html" 6show-text: true 7 8define-function: ( 9 "check-run-button", 10 (theme, color, background, hover_color, hover_background), 11 block { 12 set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} 13 reload: 14 assert-css: (".test-arrow", {"visibility": "hidden"}) 15 move-cursor-to: ".example-wrap" 16 assert-css: (".test-arrow", { 17 "visibility": "visible", 18 "color": |color|, 19 "background-color": |background|, 20 "font-size": "22px", 21 "border-radius": "5px", 22 }) 23 move-cursor-to: ".test-arrow" 24 assert-css: (".test-arrow:hover", { 25 "visibility": "visible", 26 "color": |hover_color|, 27 "background-color": |hover_background|, 28 "font-size": "22px", 29 "border-radius": "5px", 30 }) 31 }, 32) 33 34call-function: ("check-run-button", { 35 "theme": "ayu", 36 "color": "#788797", 37 "background": "rgba(57, 175, 215, 0.09)", 38 "hover_color": "#c5c5c5", 39 "hover_background": "rgba(57, 175, 215, 0.37)", 40}) 41call-function: ("check-run-button", { 42 "theme": "dark", 43 "color": "#dedede", 44 "background": "rgba(78, 139, 202, 0.2)", 45 "hover_color": "#dedede", 46 "hover_background": "rgb(78, 139, 202)", 47}) 48call-function: ("check-run-button", { 49 "theme": "light", 50 "color": "#f5f5f5", 51 "background": "rgba(78, 139, 202, 0.2)", 52 "hover_color": "#f5f5f5", 53 "hover_background": "rgb(78, 139, 202)", 54})