Skip to content

Commit

Permalink
Add GUI regression test for code in doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 26, 2024
1 parent dd3dc10 commit ae66380
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/rustdoc-gui/check-stab-in-docblock.goml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This test checks that using `.stab` attributes in `.docblock` elements doesn't
// create scrollable paragraphs.
// create scrollable paragraphs and is correctly displayed (not making weird blocks).
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
// Needs the text to be display to check for scrollable content.
show-text: true
Expand Down Expand Up @@ -31,3 +31,15 @@ assert-property: (
".top-doc .docblock p:nth-of-type(3)",
{"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
)

// Ensure that `<code>` elements in code don't make big blocks.
compare-elements-size-near: (
"#reexport\.TheStdReexport > code",
".docblock p span[data-span='1']",
{"height": 1},
)
compare-elements-size-near: (
"#reexport\.TheStdReexport > code",
".docblock p span[data-span='2']",
{"height": 1},
)

0 comments on commit ae66380

Please sign in to comment.