File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ set-window-size: (1280, 1024)
77assert-property: (".sidebar-crate .logo-container", {"offsetWidth": "96", "offsetHeight": 48})
88// offsetWidth = width of sidebar, offsetHeight = height + top padding
99assert-property: (".sidebar-crate .logo-container img", {"offsetWidth": "48", "offsetHeight": 64})
10+ assert-css: (".sidebar-crate .logo-container img", {"border-top-width": "16px", "margin-top": "-16px"})
1011
1112set-window-size: (400, 600)
1213// offset = size + margin
Original file line number Diff line number Diff line change @@ -179,3 +179,18 @@ assert-property: (".sidebar .sidebar-crate h2 a", {
179179 "offsetTop": |index_sidebar_y|,
180180 "offsetLeft": |index_sidebar_x|,
181181})
182+
183+ // Check that the sidebar links touch the left side of the box
184+ go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
185+ assert-position: (".sidebar .block a", {"x": -4})
186+ assert-position: (".sidebar-crate > h2 > a", {"x": -3})
187+
188+ // Check that the main sidebar links touch the left side of the box
189+ // but the crate name doesn't, because the logo takes that space
190+ go-to: "file://" + |DOC_PATH| + "/huge_logo/index.html"
191+ assert-position: (".sidebar .block a", {"x": -4})
192+ // when side-by-side, it's not line wrapped
193+ assert-position-false: (".sidebar-crate > h2 > a", {"x": -3})
194+ // when line-wrapped, see that it becomes flush-left again
195+ drag-and-drop: ((205, 100), (108, 100))
196+ assert-position: (".sidebar-crate > h2 > a", {"x": -3})
You can’t perform that action at this time.
0 commit comments