@@ -35,9 +35,8 @@ reload:
35
35
click: "#settings-menu"
36
36
wait-for: "#settings"
37
37
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"})
41
40
// Meaning that only the "theme" menu is showing up.
42
41
assert: ".setting-line:not(.hidden) #theme"
43
42
assert: ".setting-line.hidden #preferred-dark-theme"
@@ -105,13 +104,14 @@ assert-css: (
105
104
},
106
105
)
107
106
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")
110
111
// Wait for the hidden element to show up.
111
112
wait-for: ".setting-line:not(.hidden) #preferred-dark-theme"
112
113
assert: ".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"}
115
115
116
116
// We check their text as well.
117
117
assert-text: ("#preferred-dark-theme .setting-name", "Preferred dark theme")
0 commit comments