22go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
33show-text: true
44
5+ store-value: (default_y_pos, 5)
56define-function: (
67 "check-warning",
78 (theme, color, border_color),
@@ -16,12 +17,18 @@ define-function: (
1617 "border-left": "2px solid " + |border_color|,
1718 "background-color": "transparent",
1819 })
20+ store-position: ("#doc-warning-1", {"y": warn_div_y})
21+ store-position: ("#doc-warning-1::before", {"y": warn_y})
22+ assert: |warn_y| == |warn_div_y| + |default_y_pos|
1923 assert-css: ("#doc-warning-2", {
2024 "margin-bottom": "0px",
2125 "color": |color|,
2226 "border-left": "2px solid " + |border_color|,
2327 "background-color": "transparent",
2428 })
29+ store-position: ("#doc-warning-2", {"y": warn_div_y})
30+ store-position: ("#doc-warning-2::before", {"y": warn_y})
31+ assert: |warn_y| == |warn_div_y| + |default_y_pos|
2532 },
2633)
2734
@@ -40,3 +47,9 @@ call-function: ("check-warning", {
4047 "color": "black",
4148 "border_color": "#ff8e00",
4249})
50+
51+ // We ensure that the warning element in the top doc is not overlaying the "[-]" button.
52+ go-to: "file://" + |DOC_PATH| + "/test_docs/struct.WarningStruct.html"
53+ store-position: ("#doc-warning-0", {"y": warn_div_y})
54+ store-position: ("#doc-warning-0::before", {"y": warn_y})
55+ assert: |warn_y| == |warn_div_y| + |default_y_pos| + 15
0 commit comments