Skip to content

Commit e937928

Browse files
GuillaumeGomezsyphar
authored andcommitted
Add regression test for #2733
1 parent 51572d5 commit e937928

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

gui-tests/long-crate-name.goml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Checks that the crate name in release list doesn't overflow when hovered.
2+
3+
go-to: |DOC_PATH|
4+
// We reduce the width to 800px because the text will be on 3 different lines. Meaning
5+
// that if it overflows, the height will be smaller than expected since it will only take
6+
// 2 lines.
7+
set-window-size: (1200, 600)
8+
set-text: ("ul a.release .name", "blabla_under_something_longname_right-0.7.0")
9+
move-cursor-to: "ul a.release .name"
10+
assert-css: ("ul a.release .name:hover", { "line-height": "22.4px" })
11+
// 45 / 2 = 22.5, so it's on 2 lines
12+
assert-size: ("ul a.release .name:hover", { "height": 45 })
13+
// We reduce the width to it should now take 3 lines.
14+
set-window-size: (800, 600)
15+
// 67 / 2 = 33.5, so it's more than 2 lines
16+
assert-size: ("ul a.release .name:hover", { "height": 67 })

0 commit comments

Comments
 (0)