@@ -35,9 +35,8 @@ reload:
3535click: "#settings-menu"
3636wait-for: "#settings"
3737
38- // We check that the "Use system theme" is disabled.
39- assert-property: ("#use-system-theme", {"checked": "false"})
40- assert: "//*[@class='setting-line']//span[text()='Use system theme']"
38+ // We check that the current theme is not "system theme" is disabled.
39+ assert-property: ("#theme-system-preference", {"checked": "false"})
4140// Meaning that only the "theme" menu is showing up.
4241assert: ".setting-line:not(.hidden) #theme"
4342assert: ".setting-line.hidden #preferred-dark-theme"
@@ -105,13 +104,14 @@ assert-css: (
105104 },
106105)
107106
108- // We now switch the display.
109- click: "#use-system-theme"
107+ // We now select the "system preference" theme.
108+ click: "#theme-system-preference"
109+ // Checking its text.
110+ assert-text: ("#theme-system-preference + span", "system preference")
110111// Wait for the hidden element to show up.
111112wait-for: ".setting-line:not(.hidden) #preferred-dark-theme"
112113assert: ".setting-line:not(.hidden) #preferred-light-theme"
113- // Check that the theme picking is hidden.
114- assert: ".setting-line.hidden #theme"
114+ assert-local-storage: {"rustdoc-theme": "system-preference"}
115115
116116// We check their text as well.
117117assert-text: ("#preferred-dark-theme .setting-name", "Preferred dark theme")
0 commit comments