@@ -89,9 +89,9 @@ assert-css: (".src-line-numbers", {"text-align": "right"})
89
89
// do anything (and certainly not add a `#NaN` to the URL!).
90
90
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
91
91
// 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 })
93
93
// 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 )
95
95
assert-document-property: ({"URL": "/lib.rs.html"}, ENDS_WITH)
96
96
97
97
// Checking the source code sidebar.
@@ -163,16 +163,16 @@ assert-css: ("nav.sub", {"flex-direction": "row"})
163
163
// To check this, we maintain the invariant:
164
164
//
165
165
// 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
169
169
170
170
// Now do the same check on moderately-sized, tablet mobile.
171
171
set-window-size: (700, 700)
172
172
assert-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
176
176
177
177
// Check the sidebar directory entries have a marker and spacing (tablet).
178
178
store-property: ("#src-sidebar > .title", {
@@ -198,7 +198,12 @@ call-function: ("check-sidebar-dir-entry", {
198
198
"y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6,
199
199
})
200
200
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.
201
205
// 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"
202
207
assert-css: (".sub-logo-container > img", {"margin-bottom": "8px"})
203
208
store-property: (".sub-logo-container", {"clientHeight": logo_height})
204
209
assert-position: (".search-form", {"y": |logo_height| + 8})
0 commit comments