Skip to content

Commit 26b6ccd

Browse files
Add GUI regression test for variant structfields margins
1 parent 7cfbe23 commit 26b6ccd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/rustdoc-gui/fields.goml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// This test checks that fields are displayed as expected (one by line) and they are surrounded
22
// by margins.
33

4+
store-value: (margin, "9.6px")
45
define-function: (
56
"check-fields",
67
[path, selector_1, selector_2],
@@ -12,8 +13,8 @@ define-function: (
1213

1314
// Check the margins.
1415
assert-css: (".structfield.section-header", {
15-
"margin-top": "9.6px",
16-
"margin-bottom": "9.6px",
16+
"margin-top": |margin|,
17+
"margin-bottom": |margin|,
1718
"margin-left": "0px",
1819
"margin-right": "0px",
1920
}, ALL)
@@ -41,9 +42,9 @@ store-position: ("#variant\.B\.field\.b", {"y": b_y})
4142
assert: |a_y| < |b_y|
4243

4344
// Check the margins.
44-
assert-css: (".sub-variant-field .section-header", {
45-
"margin-top": "0px",
46-
"margin-bottom": "0px",
47-
"margin-left": "0px",
45+
assert-css: (".sub-variant-field", {
46+
"margin-top": |margin|,
47+
"margin-bottom": |margin|,
48+
"margin-left": "24px",
4849
"margin-right": "0px",
4950
}, ALL)

0 commit comments

Comments
 (0)