@@ -89,9 +89,9 @@ assert-css: (".src-line-numbers", {"text-align": "right"})
8989// do anything (and certainly not add a `#NaN` to the URL!).
9090go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
9191// We use this assert-position to know where we will click.
92- assert-position: ("//*[@id='1']", {"x": 88, "y": 112 })
92+ assert-position: ("//*[@id='1']", {"x": 88, "y": 86 })
9393// We click on the left of the "1" anchor but still in the "src-line-number" `<pre>`.
94- click: (87, 103 )
94+ click: (87, 77 )
9595assert-document-property: ({"URL": "/lib.rs.html"}, ENDS_WITH)
9696
9797// Checking the source code sidebar.
@@ -163,16 +163,16 @@ assert-css: ("nav.sub", {"flex-direction": "row"})
163163// To check this, we maintain the invariant:
164164//
165165// offsetTop[nav.sub form] = offsetTop[#main-content] - offsetHeight[nav.sub form] - offsetTop[nav.sub form]
166- assert-property: ("nav.sub form", {"offsetTop": 28 , "offsetHeight": 34})
167- assert-property: ("#main-content", {"offsetTop": 90 })
168- // 28 = 90 - 34 - 28
166+ assert-property: ("nav.sub form", {"offsetTop": 15 , "offsetHeight": 34})
167+ assert-property: ("#main-content", {"offsetTop": 64 })
168+ // 15 = 64 - 34 - 15
169169
170170// Now do the same check on moderately-sized, tablet mobile.
171171set-window-size: (700, 700)
172172assert-css: ("nav.sub", {"flex-direction": "row"})
173- assert-property: ("nav.sub form", {"offsetTop": 21 , "offsetHeight": 34})
174- assert-property: ("#main-content", {"offsetTop": 76 })
175- // 21 = 76 - 34 - 21
173+ assert-property: ("nav.sub form", {"offsetTop": 8 , "offsetHeight": 34})
174+ assert-property: ("#main-content", {"offsetTop": 50 })
175+ // 8 = 50 - 34 - 8
176176
177177// Check the sidebar directory entries have a marker and spacing (tablet).
178178store-property: ("#src-sidebar > .title", {
@@ -198,7 +198,12 @@ call-function: ("check-sidebar-dir-entry", {
198198 "y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6,
199199})
200200
201+ // The logo is not present on this page.
202+ assert-false: ".sub-logo-container > img"
203+
204+ // Check the staged-api page instead, which does.
201205// Now we check that the logo has a bottom margin so it's not stuck to the search input.
206+ go-to: "file://" + |DOC_PATH| + "/src/staged_api/lib.rs.html"
202207assert-css: (".sub-logo-container > img", {"margin-bottom": "8px"})
203208store-property: (".sub-logo-container", {"clientHeight": logo_height})
204209assert-position: (".search-form", {"y": |logo_height| + 8})
0 commit comments