@@ -146,14 +146,13 @@ define-function: (
146146 )
147147 }
148148)
149- store-property: ("# src-sidebar > . title", {
149+ store-property: (". src-sidebar- title", {
150150 "offsetHeight": source_sidebar_title_height,
151151 "offsetTop": source_sidebar_title_y,
152152})
153153call-function: ("check-sidebar-dir-entry", {
154154 "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|,
157156})
158157
159158// Check the search form
@@ -175,35 +174,25 @@ assert-property: ("#main-content", {"offsetTop": 50})
175174// 8 = 50 - 34 - 8
176175
177176// Check the sidebar directory entries have a marker and spacing (tablet).
178- store-property: ("# src-sidebar > . title", {
177+ store-property: (". src-sidebar- title", {
179178 "offsetHeight": source_sidebar_title_height,
180179 "offsetTop": source_sidebar_title_y,
181180})
182181call-function: ("check-sidebar-dir-entry", {
183182 "x": 0,
184- "y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6 ,
183+ "y": |source_sidebar_title_y| + |source_sidebar_title_height|,
185184})
186185
187186// Tiny, phone mobile gets a different display where the logo is stacked on top.
188187set-window-size: (450, 700)
189188assert-css: ("nav.sub", {"flex-direction": "column"})
190189
191190// Check the sidebar directory entries have a marker and spacing (phone).
192- store-property: ("# src-sidebar > . title", {
191+ store-property: (". src-sidebar- title", {
193192 "offsetHeight": source_sidebar_title_height,
194193 "offsetTop": source_sidebar_title_y,
195194})
196195call-function: ("check-sidebar-dir-entry", {
197196 "x": 0,
198- "y": |source_sidebar_title_y| + |source_sidebar_title_height| + 6 ,
197+ "y": |source_sidebar_title_y| + |source_sidebar_title_height|,
199198})
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