Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve rustdoc GUI tests #102199

Merged
merged 2 commits into from
Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.11.0
12 changes: 9 additions & 3 deletions src/test/rustdoc-gui/check-stab-in-docblock.goml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ size: (786, 600)
// Confirms that there 3 paragraphs.
assert-count: (".top-doc .docblock p", 3)
// Checking that there is no scrollable content.
store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(1)", "clientHeight")
store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(1)", "clientWidth")
assert-property: (
".top-doc .docblock p:nth-of-type(1)",
{"scrollHeight": "120", "clientHeight": "120", "scrollWidth": "502", "clientWidth": "502"},
{"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
)
store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(2)", "clientHeight")
store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(2)", "clientWidth")
assert-property: (
".top-doc .docblock p:nth-of-type(2)",
{"scrollHeight": "48", "clientHeight": "48", "scrollWidth": "502", "clientWidth": "502"},
{"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
)
store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(3)", "clientHeight")
store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(3)", "clientWidth")
assert-property: (
".top-doc .docblock p:nth-of-type(3)",
{"scrollHeight": "48", "clientHeight": "48", "scrollWidth": "502", "clientWidth": "502"},
{"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
)
4 changes: 2 additions & 2 deletions src/test/rustdoc-gui/type-declation-overflow.goml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ assert-property: (".item-decl pre", {"scrollWidth": "950"})
size: (600, 600)
goto: file://|DOC_PATH|/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html
// It shouldn't have an overflow in the topbar either.
assert-property: (".mobile-topbar .location", {"scrollWidth": "500"})
assert-property: (".mobile-topbar .location", {"clientWidth": "500"})
store-property: (scrollWidth, ".mobile-topbar .location", "scrollWidth")
assert-property: (".mobile-topbar .location", {"clientWidth": |scrollWidth|})
assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"})