summary refs log tree commit diff
path: root/src/test/rustdoc-gui
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2021-12-29 18:54:33 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-12-30 16:21:50 +0100
commit7c78ea5b53a8a37d3d56a79c1aeca75beab80140 (patch)
treeb4319209ad043d7e888dd5b78f496e8c404d7804 /src/test/rustdoc-gui
parentb77830d6d930f073fae595bf25f932759076f5ea (diff)
downloadrust-7c78ea5b53a8a37d3d56a79c1aeca75beab80140.tar.gz
rust-7c78ea5b53a8a37d3d56a79c1aeca75beab80140.zip
Fix display of toggles on mobile
Diffstat (limited to 'src/test/rustdoc-gui')
-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": ""})