diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:29 +0000 |
commit | 631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch) | |
tree | a1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/rustdoc-gui/sidebar-source-code.goml | |
parent | Adding debian version 1.69.0+dfsg1-1. (diff) | |
download | rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-gui/sidebar-source-code.goml')
-rw-r--r-- | tests/rustdoc-gui/sidebar-source-code.goml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/rustdoc-gui/sidebar-source-code.goml b/tests/rustdoc-gui/sidebar-source-code.goml index c8a29b58d..520b2c59b 100644 --- a/tests/rustdoc-gui/sidebar-source-code.goml +++ b/tests/rustdoc-gui/sidebar-source-code.goml @@ -1,6 +1,6 @@ // The goal of this test is to ensure that the sidebar is working as expected in the source // code pages. -goto: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html" +go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html" show-text: true // First, check the sidebar colors. @@ -8,7 +8,7 @@ define-function: ( "check-colors", (theme, color, background_color), block { - local-storage: { + set-local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false", } @@ -47,7 +47,7 @@ call-function: ( ) // Next, desktop mode layout. -size: (1100, 800) +set-window-size: (1100, 800) // We check that the sidebar isn't expanded and has the expected width. assert-css: ("nav.sidebar", {"width": "50px"}) // We now click on the button to expand the sidebar. @@ -62,7 +62,7 @@ wait-for: "html:not(.expanded)" assert: "nav.sidebar" // Checking that only the path to the current file is "open". -goto: "file://" + |DOC_PATH| + "/src/lib2/another_folder/sub_mod/mod.rs.html" +go-to: "file://" + |DOC_PATH| + "/src/lib2/another_folder/sub_mod/mod.rs.html" // First we expand the sidebar again. click: (10, 10) // We wait for the sidebar to be expanded. @@ -73,10 +73,10 @@ assert: "//*[@class='dir-entry' and @open]/*[text()='sub_mod']" // Only "another_folder" should be "open" in "lib2". assert: "//*[@class='dir-entry' and not(@open)]/*[text()='another_mod']" // All other trees should be collapsed. -assert-count: ("//*[@id='source-sidebar']/details[not(text()='lib2') and not(@open)]", 8) +assert-count: ("//*[@id='source-sidebar']/details[not(text()='lib2') and not(@open)]", 9) // We now switch to mobile mode. -size: (600, 600) +set-window-size: (600, 600) wait-for-css: (".source-sidebar-expanded nav.sidebar", {"left": "0px"}) // We collapse the sidebar. click: (10, 10) |