@@ -34,7 +34,7 @@ wait-for: "#settings"
34
34
35
35
// We check that the "Use system theme" is disabled.
36
36
assert-property: ("#use-system-theme", {"checked": "false"})
37
- assert: "//*[@class='setting-line']/* [text()='Use system theme']"
37
+ assert: "//*[@class='setting-line']//span [text()='Use system theme']"
38
38
// Meaning that only the "theme" menu is showing up.
39
39
assert: ".setting-line:not(.hidden) #theme"
40
40
assert: ".setting-line.hidden #preferred-dark-theme"
@@ -55,7 +55,13 @@ assert: ".setting-line.hidden #theme"
55
55
assert-text: ("#preferred-dark-theme .setting-name", "Preferred dark theme")
56
56
assert-text: ("#preferred-light-theme .setting-name", "Preferred light theme")
57
57
58
+ // We now check that clicking on the "sliders"' text is like clicking on the slider.
59
+ // To test it, we use the "Disable keyboard shortcuts".
60
+ local-storage: {"rustdoc-disable-shortcuts": "false"}
61
+ click: ".setting-line:last-child .toggle .label"
62
+ assert-local-storage: {"rustdoc-disable-shortcuts": "true"}
63
+
58
64
// Now we go to the settings page to check that the CSS is loaded as expected.
59
65
goto: file://|DOC_PATH|/settings.html
60
66
wait-for: "#settings"
61
- assert-css: (".setting-line .toggle", {"width": "45px", "margin-right": "20px"})
67
+ assert-css: (".setting-line .toggle .slider ", {"width": "45px", "margin-right": "20px"})
0 commit comments