@@ -34,7 +34,7 @@ wait-for: "#settings"
3434
3535// We check that the "Use system theme" is disabled.
3636assert-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']"
3838// Meaning that only the "theme" menu is showing up.
3939assert: ".setting-line:not(.hidden) #theme"
4040assert: ".setting-line.hidden #preferred-dark-theme"
@@ -55,7 +55,13 @@ assert: ".setting-line.hidden #theme"
5555assert-text: ("#preferred-dark-theme .setting-name", "Preferred dark theme")
5656assert-text: ("#preferred-light-theme .setting-name", "Preferred light theme")
5757
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+
5864// Now we go to the settings page to check that the CSS is loaded as expected.
5965goto: file://|DOC_PATH|/settings.html
6066wait-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