summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-gui/item-info.goml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-gui/item-info.goml')
-rw-r--r--tests/rustdoc-gui/item-info.goml15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/item-info.goml b/tests/rustdoc-gui/item-info.goml
index 030ff8f8a..b46d4255e 100644
--- a/tests/rustdoc-gui/item-info.goml
+++ b/tests/rustdoc-gui/item-info.goml
@@ -8,7 +8,22 @@ assert-size: (".item-info", {"width": 840})
assert-size: (".item-info .stab", {"width": 289})
assert-position: (".item-info .stab", {"x": 245})
+// We check that the display of the feature elements is not broken. It serves as regression
+// test for <https://github.com/rust-lang/rust/issues/118615>.
+set-window-size: (850, 800)
+store-position: (
+ "//*[@class='stab portability']//code[text()='Win32_System']",
+ {"x": first_line_x, "y": first_line_y},
+)
+store-position: (
+ "//*[@class='stab portability']//code[text()='Win32_System_Diagnostics']",
+ {"x": second_line_x, "y": second_line_y},
+)
+assert: |first_line_x| != |second_line_x| && |first_line_x| == 516 && |second_line_x| == 272
+assert: |first_line_y| != |second_line_y| && |first_line_y| == 688 && |second_line_y| == 711
+
// Now we ensure that they're not rendered on the same line.
+set-window-size: (1100, 800)
go-to: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
// We first ensure that there are two item info on the trait.
assert-count: ("#main-content > .item-info .stab", 2)