@@ -37,8 +37,7 @@ click: "#settings-menu"
3737wait-for: "#settings"
3838
3939// We check that the "Use system theme" is disabled.
40- assert-property: ("#use-system-theme", {"checked": "false"})
41- assert: "//*[@class='setting-line']//span[text()='Use system theme']"
40+ assert-property: ("#theme-system-preference", {"checked": "false"})
4241// Meaning that only the "theme" menu is showing up.
4342assert: ".setting-line:not(.hidden) #theme"
4443assert: ".setting-line.hidden #preferred-dark-theme"
@@ -115,13 +114,6 @@ assert-css: (
115114 "border-color": "rgb(221, 221, 221)",
116115 },
117116)
118- assert-css: (
119- "#use-system-theme",
120- {
121- "background-color": "rgba(0, 0, 0, 0)",
122- "border-color": "rgb(221, 221, 221)",
123- }
124- )
125117// Let's start with the hover for toggles.
126118move-cursor-to: "#auto-hide-large-items"
127119assert-css: (
@@ -131,14 +123,6 @@ assert-css: (
131123 "border-color": "rgb(33, 150, 243)",
132124 },
133125)
134- move-cursor-to: "#use-system-theme"
135- assert-css: (
136- "#use-system-theme",
137- {
138- "background-color": "rgba(0, 0, 0, 0)",
139- "border-color": "rgb(33, 150, 243)",
140- }
141- )
142126move-cursor-to: "#settings-menu > a"
143127// Let's now check with the focus for toggles.
144128focus: "#auto-hide-large-items"
@@ -150,15 +134,6 @@ assert-css: (
150134 "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px",
151135 },
152136)
153- focus: "#use-system-theme"
154- assert-css: (
155- "#use-system-theme",
156- {
157- "background-color": "rgba(0, 0, 0, 0)",
158- "border-color": "rgb(221, 221, 221)",
159- "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px",
160- },
161- )
162137// Now we check we both focus and hover for toggles.
163138move-cursor-to: "#auto-hide-large-items"
164139focus: "#auto-hide-large-items"
@@ -170,24 +145,12 @@ assert-css: (
170145 "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px",
171146 },
172147)
173- move-cursor-to: "#use-system-theme"
174- focus: "#use-system-theme"
175- assert-css: (
176- "#use-system-theme",
177- {
178- "background-color": "rgba(0, 0, 0, 0)",
179- "border-color": "rgb(33, 150, 243)",
180- "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px",
181- },
182- )
183148
184149// We now switch the display.
185- click: "#use -system-theme "
150+ click: "#theme -system-preference "
186151// Wait for the hidden element to show up.
187152wait-for: ".setting-line:not(.hidden) #preferred-dark-theme"
188153assert: ".setting-line:not(.hidden) #preferred-light-theme"
189- // Check that the theme picking is hidden.
190- assert: ".setting-line.hidden #theme"
191154
192155// We check their text as well.
193156assert-text: ("#preferred-dark-theme .setting-name", "Preferred dark theme")
0 commit comments