@@ -146,14 +146,13 @@ define-function: (
146
146
)
147
147
}
148
148
)
149
- store-property: ("# src-sidebar > . title", {
149
+ store-property: (". src-sidebar- title", {
150
150
"offsetHeight": source_sidebar_title_height,
151
151
"offsetTop": source_sidebar_title_y,
152
152
})
153
153
call-function: ("check-sidebar-dir-entry", {
154
154
"x": 0,
155
- // border + margin = 6
156
- "y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6,
155
+ "y": |source_sidebar_title_y| + |source_sidebar_title_height|,
157
156
})
158
157
159
158
// Check the search form
@@ -175,35 +174,25 @@ assert-property: ("#main-content", {"offsetTop": 50})
175
174
// 8 = 50 - 34 - 8
176
175
177
176
// Check the sidebar directory entries have a marker and spacing (tablet).
178
- store-property: ("# src-sidebar > . title", {
177
+ store-property: (". src-sidebar- title", {
179
178
"offsetHeight": source_sidebar_title_height,
180
179
"offsetTop": source_sidebar_title_y,
181
180
})
182
181
call-function: ("check-sidebar-dir-entry", {
183
182
"x": 0,
184
- "y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6 ,
183
+ "y": |source_sidebar_title_y| + |source_sidebar_title_height|,
185
184
})
186
185
187
186
// Tiny, phone mobile gets a different display where the logo is stacked on top.
188
187
set-window-size: (450, 700)
189
188
assert-css: ("nav.sub", {"flex-direction": "column"})
190
189
191
190
// Check the sidebar directory entries have a marker and spacing (phone).
192
- store-property: ("# src-sidebar > . title", {
191
+ store-property: (". src-sidebar- title", {
193
192
"offsetHeight": source_sidebar_title_height,
194
193
"offsetTop": source_sidebar_title_y,
195
194
})
196
195
call-function: ("check-sidebar-dir-entry", {
197
196
"x": 0,
198
- "y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6 ,
197
+ "y": |source_sidebar_title_y| + |source_sidebar_title_height|,
199
198
})
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.
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"
207
- assert-css: (".sub-logo-container > img", {"margin-bottom": "8px"})
208
- store-property: (".sub-logo-container", {"clientHeight": logo_height})
209
- assert-position: (".search-form", {"y": |logo_height| + 8})
0 commit comments