2
2
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
3
3
show-text: true
4
4
5
+ store-value: (default_y_pos, 5)
5
6
define-function: (
6
7
"check-warning",
7
8
(theme, color, border_color),
@@ -16,12 +17,18 @@ define-function: (
16
17
"border-left": "2px solid " + |border_color|,
17
18
"background-color": "transparent",
18
19
})
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|
19
23
assert-css: ("#doc-warning-2", {
20
24
"margin-bottom": "0px",
21
25
"color": |color|,
22
26
"border-left": "2px solid " + |border_color|,
23
27
"background-color": "transparent",
24
28
})
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|
25
32
},
26
33
)
27
34
@@ -40,3 +47,9 @@ call-function: ("check-warning", {
40
47
"color": "black",
41
48
"border_color": "#ff8e00",
42
49
})
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