@@ -43,12 +43,12 @@ wait-for: "#settings"
4343// We check that the "Use system theme" is disabled.
4444assert-property: ("#theme-system-preference", {"checked": "false"})
4545// Meaning that only the "theme" menu is showing up.
46- assert: ".setting-line:not(.hidden) #theme "
47- assert: ".setting-line.hidden #preferred-dark-theme"
48- assert: ".setting-line.hidden #preferred-light-theme"
46+ assert: "#theme .setting-line:not(.hidden)"
47+ assert: "#preferred-dark-theme.setting-line.hidden "
48+ assert: "#preferred-light-theme.setting-line.hidden "
4949
5050// We check that the correct theme is selected.
51- assert-property: ("#theme .choices #theme-dark", {"checked": "true"})
51+ assert-property: ("#theme .setting-radio- choices #theme-dark", {"checked": "true"})
5252
5353// Some style checks...
5454move-cursor-to: "#settings-menu > a"
@@ -109,31 +109,31 @@ assert-css: (
109109 "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px",
110110 },
111111)
112- // Now we check the setting-name for radio buttons is on a different line than the label.
112+ // Now we check the setting-radio-name is on a different line than the label.
113113compare-elements-position-near: (
114- "#theme .setting-name",
115- "#theme .choices",
114+ "#theme .setting-radio- name",
115+ "#theme .setting-radio- choices",
116116 {"x": 1}
117117)
118118compare-elements-position-near-false: (
119- "#theme .setting-name",
120- "#theme .choices",
119+ "#theme .setting-radio- name",
120+ "#theme .setting-radio- choices",
121121 {"y": 1}
122122)
123123// Now we check that the label positions are all on the same line.
124124compare-elements-position-near: (
125- "#theme .choices #theme-light",
126- "#theme .choices #theme-dark",
125+ "#theme .setting-radio- choices #theme-light",
126+ "#theme .setting-radio- choices #theme-dark",
127127 {"y": 1}
128128)
129129compare-elements-position-near: (
130- "#theme .choices #theme-dark",
131- "#theme .choices #theme-ayu",
130+ "#theme .setting-radio- choices #theme-dark",
131+ "#theme .setting-radio- choices #theme-ayu",
132132 {"y": 1}
133133)
134134compare-elements-position-near: (
135- "#theme .choices #theme-ayu",
136- "#theme .choices #theme-system-preference",
135+ "#theme .setting-radio- choices #theme-ayu",
136+ "#theme .setting-radio- choices #theme-system-preference",
137137 {"y": 1}
138138)
139139
@@ -180,17 +180,17 @@ assert-css: (
180180// We now switch the display.
181181click: "#theme-system-preference"
182182// Wait for the hidden element to show up.
183- wait-for: ".setting-line:not(.hidden) #preferred-dark-theme "
184- assert: ".setting-line:not(.hidden) #preferred-light-theme "
183+ wait-for: "#preferred-dark-theme .setting-line:not(.hidden)"
184+ assert: "#preferred-light-theme .setting-line:not(.hidden)"
185185
186186// We check their text as well.
187- assert-text: ("#preferred-dark-theme .setting-name", "Preferred dark theme")
188- assert-text: ("#preferred-light-theme .setting-name", "Preferred light theme")
187+ assert-text: ("#preferred-dark-theme .setting-radio- name", "Preferred dark theme")
188+ assert-text: ("#preferred-light-theme .setting-radio- name", "Preferred light theme")
189189
190190// We now check that clicking on the toggles' text is like clicking on the checkbox.
191191// To test it, we use the "Disable keyboard shortcuts".
192192local-storage: {"rustdoc-disable-shortcuts": "false"}
193- click: ".setting-line:last-child .settings-toggle .label "
193+ click: ".setting-line:last-child .setting-check span "
194194assert-local-storage: {"rustdoc-disable-shortcuts": "true"}
195195
196196// Make sure that "Disable keyboard shortcuts" actually took effect.
@@ -200,7 +200,7 @@ assert-false: "#help-button .popover"
200200wait-for-css: ("#settings-menu .popover", {"display": "block"})
201201
202202// Now turn keyboard shortcuts back on, and see if they work.
203- click: ".setting-line:last-child .settings-toggle .label "
203+ click: ".setting-line:last-child .setting-check span "
204204assert-local-storage: {"rustdoc-disable-shortcuts": "false"}
205205press-key: "Escape"
206206press-key: "?"
0 commit comments