Update tests for new browser-ui-test version
This commit is contained in:
parent
9c3cb2d9bf
commit
d010f95af1
5 changed files with 15 additions and 12 deletions
|
@ -6,7 +6,7 @@ size: (1100, 800)
|
|||
compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
|
||||
assert-property: (".top-doc .docblock", {"scrollWidth": "801"})
|
||||
// However, since there is overflow in the <table>, its scroll width is bigger.
|
||||
assert-property: (".top-doc .docblock table", {"scrollWidth": "1573"})
|
||||
assert-property: (".top-doc .docblock table", {"scrollWidth": "1572"})
|
||||
|
||||
// Checking it works on other doc blocks as well...
|
||||
|
||||
|
@ -18,4 +18,4 @@ compare-elements-property: (
|
|||
)
|
||||
assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "801"})
|
||||
// However, since there is overflow in the <table>, its scroll width is bigger.
|
||||
assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1573"})
|
||||
assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1572"})
|
||||
|
|
|
@ -6,7 +6,7 @@ assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
|
|||
|
||||
// Scroll down.
|
||||
scroll-to: "//h2[@id='blanket-implementations']"
|
||||
assert-window-property: {"pageYOffset": "702"}
|
||||
assert-window-property: {"pageYOffset": "643"}
|
||||
|
||||
// Open the sidebar menu.
|
||||
click: ".sidebar-menu-toggle"
|
||||
|
@ -21,11 +21,11 @@ assert-window-property: {"pageYOffset": "0"}
|
|||
// Close the sidebar menu. Make sure the scroll position gets restored.
|
||||
click: ".sidebar-menu-toggle"
|
||||
wait-for-css: (".sidebar", {"left": "-1000px"})
|
||||
assert-window-property: {"pageYOffset": "702"}
|
||||
assert-window-property: {"pageYOffset": "643"}
|
||||
|
||||
// Now test that scrollability returns when the browser window is just resized.
|
||||
click: ".sidebar-menu-toggle"
|
||||
wait-for-css: (".sidebar", {"left": "0px"})
|
||||
assert-window-property: {"pageYOffset": "0"}
|
||||
size: (900, 900)
|
||||
assert-window-property: {"pageYOffset": "702"}
|
||||
size: (900, 600)
|
||||
assert-window-property: {"pageYOffset": "643"}
|
||||
|
|
|
@ -224,14 +224,14 @@ click: "#sidebar-toggle"
|
|||
wait-for-css: (".sidebar", {"width": "0px"})
|
||||
// We scroll to line 117 to change the scroll position.
|
||||
scroll-to: '//*[@id="117"]'
|
||||
assert-window-property: {"pageYOffset": "2519"}
|
||||
assert-window-property: {"pageYOffset": "2542"}
|
||||
// Expanding the sidebar...
|
||||
click: "#sidebar-toggle"
|
||||
wait-for-css: (".sidebar", {"width": "500px"})
|
||||
click: "#sidebar-toggle"
|
||||
wait-for-css: (".sidebar", {"width": "0px"})
|
||||
// The "scrollTop" property should be the same.
|
||||
assert-window-property: {"pageYOffset": "2519"}
|
||||
assert-window-property: {"pageYOffset": "2542"}
|
||||
|
||||
// We now check that the scroll position is restored if the window is resized.
|
||||
size: (500, 700)
|
||||
|
@ -239,7 +239,7 @@ click: "#sidebar-toggle"
|
|||
wait-for-css: ("#source-sidebar", {"visibility": "visible"})
|
||||
assert-window-property: {"pageYOffset": "0"}
|
||||
size: (900, 900)
|
||||
assert-window-property: {"pageYOffset": "2519"}
|
||||
assert-window-property: {"pageYOffset": "2542"}
|
||||
size: (500, 700)
|
||||
click: "#sidebar-toggle"
|
||||
wait-for-css: ("#source-sidebar", {"visibility": "hidden"})
|
||||
|
|
|
@ -4,7 +4,10 @@ goto: file://|DOC_PATH|/lib2/struct.Foo.html
|
|||
assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
|
||||
click: "h4.code-header" // This is the position of "pub" in "pub fn a_method"
|
||||
assert-attribute: (".impl-items .rustdoc-toggle", {"open": ""})
|
||||
click: ".impl-items .rustdoc-toggle summary::before" // This is the position of "[-]" next to that pub fn.
|
||||
click-with-offset: (
|
||||
".impl-items .rustdoc-toggle summary",
|
||||
{"x": -24, "y": 8}, // This is the position of "[-]" next to that pub fn.
|
||||
)
|
||||
assert-attribute-false: (".impl-items .rustdoc-toggle", {"open": ""})
|
||||
|
||||
// Click the "Trait" part of "impl Trait" and verify it navigates.
|
||||
|
|
|
@ -32,6 +32,6 @@ assert-property: (".item-decl pre", {"scrollWidth": "950"})
|
|||
size: (600, 600)
|
||||
goto: file://|DOC_PATH|/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html
|
||||
// It shouldn't have an overflow in the topbar either.
|
||||
assert-property: (".mobile-topbar .location", {"scrollWidth": "502"})
|
||||
assert-property: (".mobile-topbar .location", {"clientWidth": "502"})
|
||||
assert-property: (".mobile-topbar .location", {"scrollWidth": "500"})
|
||||
assert-property: (".mobile-topbar .location", {"clientWidth": "500"})
|
||||
assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"})
|
||||
|
|
Loading…
Add table
Reference in a new issue