Update GUI tests for documentation indent changes
This commit is contained in:
parent
8fb6c08f49
commit
4f20626cef
7 changed files with 18 additions and 13 deletions
|
@ -20,8 +20,12 @@ assert-css: (".big-toggle summary::before", {
|
|||
"left": "-11px",
|
||||
"top": "9px",
|
||||
})
|
||||
// It should have the same X position as the other toggles.
|
||||
compare-elements-position: (".big-toggle summary::before", ".method-toggle summary::before", ["x"])
|
||||
// It should have a slightly different X position as the other toggles.
|
||||
store-position: (".big-toggle summary::before", {"x": big_toggle})
|
||||
store-position: (".method-toggle summary::before", {"x": small_toggle})
|
||||
assert: |big_toggle| < |small_toggle|
|
||||
// Margin is 0.5em so around 8 px.
|
||||
assert: |small_toggle| - |big_toggle| < 10
|
||||
// But still shouldn't have the same Y position.
|
||||
compare-elements-position-false: (
|
||||
".big-toggle summary::before",
|
||||
|
|
|
@ -16,6 +16,6 @@ compare-elements-property: (
|
|||
"#implementations-list > details .docblock > p",
|
||||
["scrollWidth"],
|
||||
)
|
||||
assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "816"})
|
||||
assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "832"})
|
||||
// However, since there is overflow in the <table>, its scroll width is bigger.
|
||||
assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1572"})
|
||||
|
|
|
@ -4,7 +4,9 @@ go-to: "file://" + |DOC_PATH| + "/lib2/struct.ItemInfoAlignmentTest.html"
|
|||
|
||||
// First, we try it in "desktop" mode.
|
||||
set-window-size: (1200, 870)
|
||||
wait-for-size: ("body", {"width": 1200})
|
||||
compare-elements-position: (".impl-items > .item-info", "summary > .item-info", ["x"])
|
||||
// Next, we try it in "mobile" mode (max-width: 700px).
|
||||
set-window-size: (650, 650)
|
||||
wait-for-size: ("body", {"width": 650})
|
||||
compare-elements-position: (".impl-items > .item-info", "summary > .item-info", ["x"])
|
||||
|
|
|
@ -19,7 +19,7 @@ store-position: (
|
|||
"//*[@class='stab portability']//code[normalize-space()='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_x| != |second_line_x| && |first_line_x| == 524 && |second_line_x| == 280
|
||||
assert: |first_line_y| != |second_line_y| && |first_line_y| == 718 && |second_line_y| == 741
|
||||
|
||||
// Now we ensure that they're not rendered on the same line.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// This test is to ensure that methods are correctly aligned on the left side.
|
||||
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
||||
|
||||
// First we ensure that we have methods with and without documentation.
|
||||
assert: ".impl-items > details.method-toggle > summary > section.method"
|
||||
assert: ".impl-items > section.method"
|
||||
|
|
|
@ -62,9 +62,9 @@ define-function: (
|
|||
// We start with a wide screen.
|
||||
set-window-size: (1100, 600)
|
||||
call-function: ("check-notable-tooltip-position-complete", {
|
||||
"x": 677,
|
||||
"i_x": 955,
|
||||
"popover_x": 463,
|
||||
"x": 685,
|
||||
"i_x": 963,
|
||||
"popover_x": 471,
|
||||
})
|
||||
|
||||
// Now only the `i` should be on the next line.
|
||||
|
@ -78,16 +78,16 @@ compare-elements-position-false: (
|
|||
// Now both the `i` and the struct name should be on the next line.
|
||||
set-window-size: (980, 600)
|
||||
call-function: ("check-notable-tooltip-position", {
|
||||
"x": 245,
|
||||
"i_x": 523,
|
||||
"x": 253,
|
||||
"i_x": 531,
|
||||
})
|
||||
|
||||
// Checking on mobile now.
|
||||
set-window-size: (650, 600)
|
||||
wait-for-size: ("body", {"width": 650})
|
||||
call-function: ("check-notable-tooltip-position-complete", {
|
||||
"x": 25,
|
||||
"i_x": 303,
|
||||
"x": 26,
|
||||
"i_x": 305,
|
||||
"popover_x": 0,
|
||||
})
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ assert-position: ("#implementations-list > details > summary::before", {"x": 4})
|
|||
// Assert the position of the toggle on a method.
|
||||
assert-position: (
|
||||
"#trait-implementations-list .impl-items .method-toggle > summary::before",
|
||||
{"x": 4},
|
||||
{"x": 6},
|
||||
)
|
||||
|
||||
// Now we do the same but with a little bigger width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue