fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// We check that when the anchor changes and is output of the displayed content, 2// the page is scrolled to it. 3go-to: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html" 4 5// We reduce the window size to make it easier to make an element "out of the page". 6set-window-size: (600, 800) 7// We check that the scroll is at the top first. 8assert-property: ("html", {"scrollTop": "0"}) 9 10click: '//a[text() = "barbar" and @href="#5-7"]' 11assert-property: ("html", {"scrollTop": "149"}) 12click: '//a[text() = "bar" and @href="#28-36"]' 13assert-property: ("html", {"scrollTop": "180"}) 14click: '//a[text() = "sub_fn" and @href="#2-4"]' 15assert-property: ("html", {"scrollTop": "77"}) 16 17// We now check that clicking on lines doesn't change the scroll 18// Extra information: the "sub_fn" function header is on line 1. 19click: '//*[@id="6"]' 20assert-property: ("html", {"scrollTop": "77"})