Skip to content

Commit 43681bf

Browse files
Update GUI tests for sans-serif font
1 parent 2bc3cd8 commit 43681bf

7 files changed

+23
-23
lines changed

tests/rustdoc-gui/anchor-navigable.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
88
// We check that ".item-info" is bigger than its content.
99
move-cursor-to: ".impl"
10-
assert-property: (".impl > a.anchor", {"offsetWidth": "8"})
10+
assert-property: (".impl > a.anchor", {"offsetWidth": "9"})
1111
assert-css: (".impl > a.anchor", {"left": "-8px"})

tests/rustdoc-gui/docblock-table-overflow.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set-window-size: (1100, 800)
66
compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
77
assert-property: (".top-doc .docblock", {"scrollWidth": "816"})
88
// However, since there is overflow in the <table>, its scroll width is bigger.
9-
assert-property: (".top-doc .docblock table", {"scrollWidth": "1572"})
9+
assert-property: (".top-doc .docblock table", {"scrollWidth": "1479"})
1010

1111
// Checking it works on other doc blocks as well...
1212

@@ -18,4 +18,4 @@ compare-elements-property: (
1818
)
1919
assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "816"})
2020
// However, since there is overflow in the <table>, its scroll width is bigger.
21-
assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1572"})
21+
assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1479"})

tests/rustdoc-gui/enum-variants.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ assert-css: (".variants > .docblock", {"margin": "0px 0px 32px 24px"})
66

77
assert-css: (
88
"details.non-exhaustive > summary",
9-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
9+
{"font-family": '"Fira Sans", sans-serif'},
1010
)

tests/rustdoc-gui/item-info.goml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
55
set-window-size: (1100, 800)
66
// We check that ".item-info" is bigger than its content.
77
assert-size: (".item-info", {"width": 840})
8-
assert-size: (".item-info .stab", {"width": 289})
8+
assert-size: (".item-info .stab", {"width": 291})
99
assert-position: (".item-info .stab", {"x": 245})
1010

1111
// We check that the display of the feature elements is not broken. It serves as regression
@@ -19,8 +19,8 @@ store-position: (
1919
"//*[@class='stab portability']//code[normalize-space()='Win32_System_Diagnostics']",
2020
{"x": second_line_x, "y": second_line_y},
2121
)
22-
assert: |first_line_x| != |second_line_x| && |first_line_x| == 516 && |second_line_x| == 272
23-
assert: |first_line_y| != |second_line_y| && |first_line_y| == 718 && |second_line_y| == 741
22+
assert: |first_line_x| != |second_line_x| && |first_line_x| == 519 && |second_line_x| == 272
23+
assert: |first_line_y| != |second_line_y| && |first_line_y| == 719 && |second_line_y| == 742
2424

2525
// Now we ensure that they're not rendered on the same line.
2626
set-window-size: (1100, 800)

tests/rustdoc-gui/module-items-font.goml

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,66 @@
22
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
33
assert-css: (
44
".item-table .item-name > a",
5-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
5+
{"font-family": '"Fira Sans", sans-serif'},
66
ALL,
77
)
88
assert-css: (
99
".item-table .docblock-short",
10-
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
10+
{"font-family": '"Fira Sans", sans-serif'},
1111
ALL,
1212
)
1313

1414
// modules
1515
assert-css: (
1616
"#modules + .item-table .item-name a",
17-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
17+
{"font-family": '"Fira Sans", sans-serif'},
1818
)
1919
assert-css: (
2020
"#modules + .item-table .desc.docblock-short",
21-
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
21+
{"font-family": '"Fira Sans", sans-serif'},
2222
)
2323
// structs
2424
assert-css: (
2525
"#structs + .item-table .item-name a",
26-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
26+
{"font-family": '"Fira Sans", sans-serif'},
2727
)
2828
assert-css: (
2929
"#structs + .item-table .desc.docblock-short",
30-
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
30+
{"font-family": '"Fira Sans", sans-serif'},
3131
)
3232
// enums
3333
assert-css: (
3434
"#enums + .item-table .item-name a",
35-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
35+
{"font-family": '"Fira Sans", sans-serif'},
3636
)
3737
assert-css: (
3838
"#enums + .item-table .desc.docblock-short",
39-
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
39+
{"font-family": '"Fira Sans", sans-serif'},
4040
)
4141
// traits
4242
assert-css: (
4343
"#traits + .item-table .item-name a",
44-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
44+
{"font-family": '"Fira Sans", sans-serif'},
4545
)
4646
assert-css: (
4747
"#traits + .item-table .desc.docblock-short",
48-
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
48+
{"font-family": '"Fira Sans", sans-serif'},
4949
)
5050
// functions
5151
assert-css: (
5252
"#functions + .item-table .item-name a",
53-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
53+
{"font-family": '"Fira Sans", sans-serif'},
5454
)
5555
assert-css: (
5656
"#functions + .item-table .desc.docblock-short",
57-
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
57+
{"font-family": '"Fira Sans", sans-serif'},
5858
)
5959
// keywords
6060
assert-css: (
6161
"#keywords + .item-table .item-name a",
62-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
62+
{"font-family": '"Fira Sans", sans-serif'},
6363
)
6464
assert-css: (
6565
"#keywords + .item-table .desc.docblock-short",
66-
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
66+
{"font-family": '"Fira Sans", sans-serif'},
6767
)

tests/rustdoc-gui/scrape-examples-fonts.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test ensures that the correct font is used in scraped examples.
22
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
33

4-
store-value: (font, '"Fira Sans", Arial, NanumBarunGothic, sans-serif')
4+
store-value: (font, '"Fira Sans", sans-serif')
55

66
wait-for-css: (".scraped-example-title", {"font-family": |font|})
77
wait-for-css: (".more-examples-toggle summary", {"font-family": |font|})

tests/rustdoc-gui/toggle-docs.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ assert-attribute-false: ("#main-content > details.top-doc", {"open": ""})
1010
assert-text: ("#toggle-all-docs", "Show all")
1111
assert-css: (
1212
"#main-content > details.top-doc > summary",
13-
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
13+
{"font-family": '"Fira Sans", sans-serif'},
1414
)
1515
click: "#toggle-all-docs"
1616
// Not collapsed anymore so the "open" attribute should be back.

0 commit comments

Comments
 (0)