Skip to content

Commit 11a40ec

Browse files
Add more GUI tests for settings page
1 parent e14d2ef commit 11a40ec

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/test/rustdoc-gui/settings.goml

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// This test ensures that the settings menu display is working as expected.
1+
// This test ensures that the settings menu display is working as expected and that
2+
// the settings page is also rendered as expected.
23
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
34
show-text: true // needed when we check for colors below.
45
// First, we check that the settings page doesn't exist.
@@ -140,7 +141,13 @@ assert-css: ("#settings-menu .popover", {"display": "none"})
140141
// Now we go to the settings page to check that the CSS is loaded as expected.
141142
goto: "file://" + |DOC_PATH| + "/settings.html"
142143
wait-for: "#settings"
143-
assert-css: (".setting-line .toggle .slider", {"width": "45px", "margin-right": "20px"})
144+
assert-css: (
145+
".setting-line .toggle .slider",
146+
{"width": "45px", "margin-right": "20px", "border": "0px none rgb(0, 0, 0)"},
147+
)
148+
149+
assert-attribute-false: ("#settings", {"class": "popover"}, CONTAINS)
150+
compare-elements-position: (".sub-container", "#settings", ("x"))
144151

145152
// We now check the display with JS disabled.
146153
assert-false: "noscript section"

0 commit comments

Comments
 (0)