about summary refs log tree commit diff
path: root/src/test/rustdoc-gui/toggle-docs-mobile.goml
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-31 22:57:51 +0000
committerbors <bors@rust-lang.org>2021-12-31 22:57:51 +0000
commit4d2e0fd96ccbb9ade41f1a3f07b14b7437f8e4ef (patch)
treeae02e3e70631489b0ee454b28b13242f8ecdc4ea /src/test/rustdoc-gui/toggle-docs-mobile.goml
parentcfa3fe5af339e724209b25715282adae0c61628f (diff)
parent2da54c729ecd3ad6a4557ccc6b4f9e6ef8632ae2 (diff)
Auto merge of #92465 - matthiaskrgr:rollup-yuary84, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #90383 (Extend check for UnsafeCell in consts to cover unions)
 - #91375 (config.rs: Add support for a per-target default_linker option.)
 - #91480 (rustdoc: use smaller number of colors to distinguish items)
 - #92338 (Add try_reserve and  try_reserve_exact for OsString)
 - #92405 (Add a couple needs-asm-support headers to tests)
 - #92435 (Sync rustc_codegen_cranelift)
 - #92440 (Fix mobile toggles position)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc-gui/toggle-docs-mobile.goml')
-rw-r--r--src/test/rustdoc-gui/toggle-docs-mobile.goml10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/toggle-docs-mobile.goml b/src/test/rustdoc-gui/toggle-docs-mobile.goml
index 471d88701d4..b370dd012fa 100644
--- a/src/test/rustdoc-gui/toggle-docs-mobile.goml
+++ b/src/test/rustdoc-gui/toggle-docs-mobile.goml
@@ -9,6 +9,16 @@ assert-attribute: (".top-doc", {"open": ""})
 click: (3, 280)
 assert-attribute: (".top-doc", {"open": ""})
 
+// Assert the position of the toggle on the top doc block.
+assert-position: (".top-doc summary::before", {"x": 4})
+// Assert the position of the toggle on the impl block.
+assert-position: ("#implementations + details > summary::before", {"x": 4})
+// Assert the position of the toggle on a method.
+assert-position: (
+    "#trait-implementations-list .impl-items .method-toggle > summary::before",
+    {"x": 4},
+)
+
 // Now we do the same but with a little bigger width
 size: (600, 600)
 assert-attribute: (".top-doc", {"open": ""})