File: docblock-details.goml

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (34 lines) | stat: -rw-r--r-- 1,488 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// This ensures that the `<details>`/`<summary>` elements are displayed as expected.
include: "utils.goml"
go-to: "file://" + |DOC_PATH| + "/test_docs/details/struct.Details.html"
show-text: true
call-function: ("switch-theme", {"theme": "dark"})

// We first check that the headers in the `.top-doc` doc block still have their
// bottom border.
assert-text: (".top-doc .docblock > h3", "§Hello")
assert-css: (
    ".top-doc .docblock > h3",
    {"border-bottom": "1px solid #d2d2d2"},
)
// We now check that the `<summary>` doesn't have a bottom border and has the correct display.
assert-css: (
    ".top-doc .docblock summary h4",
    {"border-bottom-width": "0px"},
)
// This allows to ensure that summary is on one line only!
assert-property: (".top-doc .docblock summary h4", {"offsetHeight": "33"})
assert-css: (".top-doc .docblock summary h4", {"margin-top": "15px", "margin-bottom": "5px"})
// So `33 + 15 + 5` == `53`
assert-property: (".top-doc .docblock summary", {"offsetHeight": "53"})

// We now check the `<summary>` on a method.
assert-css: (
    ".method-toggle .docblock summary h4",
    {"border-bottom-width": "0px"},
)
// This allows to ensure that summary is on one line only!
assert-property: (".method-toggle .docblock summary h4", {"offsetHeight": "30"})
assert-css: (".method-toggle .docblock summary h4", {"margin-top": "15px", "margin-bottom": "5px"})
// So `30 + 15 + 5` == `50`
assert-property: (".method-toggle .docblock summary", {"offsetHeight": "50"})