Add GUI regression test for code in doc blocks

This commit is contained in:
Guillaume Gomez 2024-10-26 15:45:17 +02:00
parent dd3dc103fc
commit ae66380da0

View File

@ -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
@ -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},
)