rust/tests/rustdoc-gui/sidebar-resize.goml

29 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-09-07 20:45:24 -05:00
// Checks sidebar resizing
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
assert-property: (".sidebar", {"clientWidth": "200"})
show-text: true
// normal resizing
drag-and-drop: ((205, 100), (185, 100))
assert-property: (".sidebar", {"clientWidth": "182"})
// resize past maximum (don't grow past 500)
drag-and-drop: ((185, 100), (600, 100))
assert-property: (".sidebar", {"clientWidth": "500"})
// resize past minimum (hide sidebar)
drag-and-drop: ((501, 100), (5, 100))
assert-property: (".sidebar", {"clientWidth": "0"})
assert-css: (".sidebar", {"display": "none"})
assert-local-storage: {"rustdoc-hide-sidebar": "true"}
set-local-storage: {"rustdoc-hide-sidebar": "false"}
// Now same thing, but for source code
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
assert-property: (".sidebar", {"clientWidth": "49"})
drag-and-drop: ((52, 100), (185, 100))
assert-property: (".sidebar", {"clientWidth": "181"})
drag-and-drop: ((185, 100), (600, 100))
assert-property: (".sidebar", {"clientWidth": "499"})
drag-and-drop: ((500, 100), (5, 100))
// instead of hiding the sidebar entirely, this
// will switch to the toggle mode
assert-property: (".sidebar", {"clientWidth": "49"})