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