fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// This ensures that the `<details>`/`<summary>` elements are displayed as expected. 2go-to: "file://" + |DOC_PATH| + "/test_docs/details/struct.Details.html" 3show-text: true 4set-local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"} 5reload: 6 7// We first check that the headers in the `.top-doc` doc block still have their 8// bottom border. 9assert-text: (".top-doc .docblock > h3", "Hello") 10assert-css: ( 11 ".top-doc .docblock > h3", 12 {"border-bottom": "1px solid #d2d2d2"}, 13) 14// We now check that the `<summary>` doesn't have a bottom border and has the correct display. 15assert-css: ( 16 ".top-doc .docblock summary h4", 17 {"border-bottom-width": "0px"}, 18) 19// This allows to ensure that summary is on one line only! 20assert-property: (".top-doc .docblock summary h4", {"offsetHeight": "33"}) 21assert-css: (".top-doc .docblock summary h4", {"margin-top": "15px", "margin-bottom": "5px"}) 22// So `33 + 15 + 5` == `53` 23assert-property: (".top-doc .docblock summary", {"offsetHeight": "53"}) 24 25// We now check the `<summary>` on a method. 26assert-css: ( 27 ".method-toggle .docblock summary h4", 28 {"border-bottom-width": "0px"}, 29) 30// This allows to ensure that summary is on one line only! 31assert-property: (".method-toggle .docblock summary h4", {"offsetHeight": "30"}) 32assert-css: (".method-toggle .docblock summary h4", {"margin-top": "15px", "margin-bottom": "5px"}) 33// So `30 + 15 + 5` == `50` 34assert-property: (".method-toggle .docblock summary", {"offsetHeight": "50"})