From 4074aae052ca58c98c9f5949195edc20ccf4b82d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 13 Nov 2022 15:50:02 +0100 Subject: [PATCH] Update GUI test --- src/test/rustdoc-gui/settings.goml | 41 ++---------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/src/test/rustdoc-gui/settings.goml b/src/test/rustdoc-gui/settings.goml index 7e7971d47fb..fc3beaa53fa 100644 --- a/src/test/rustdoc-gui/settings.goml +++ b/src/test/rustdoc-gui/settings.goml @@ -37,8 +37,7 @@ click: "#settings-menu" wait-for: "#settings" // We check that the "Use system theme" is disabled. -assert-property: ("#use-system-theme", {"checked": "false"}) -assert: "//*[@class='setting-line']//span[text()='Use system theme']" +assert-property: ("#theme-system-preference", {"checked": "false"}) // Meaning that only the "theme" menu is showing up. assert: ".setting-line:not(.hidden) #theme" assert: ".setting-line.hidden #preferred-dark-theme" @@ -115,13 +114,6 @@ assert-css: ( "border-color": "rgb(221, 221, 221)", }, ) -assert-css: ( - "#use-system-theme", - { - "background-color": "rgba(0, 0, 0, 0)", - "border-color": "rgb(221, 221, 221)", - } -) // Let's start with the hover for toggles. move-cursor-to: "#auto-hide-large-items" assert-css: ( @@ -131,14 +123,6 @@ assert-css: ( "border-color": "rgb(33, 150, 243)", }, ) -move-cursor-to: "#use-system-theme" -assert-css: ( - "#use-system-theme", - { - "background-color": "rgba(0, 0, 0, 0)", - "border-color": "rgb(33, 150, 243)", - } -) move-cursor-to: "#settings-menu > a" // Let's now check with the focus for toggles. focus: "#auto-hide-large-items" @@ -150,15 +134,6 @@ assert-css: ( "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px", }, ) -focus: "#use-system-theme" -assert-css: ( - "#use-system-theme", - { - "background-color": "rgba(0, 0, 0, 0)", - "border-color": "rgb(221, 221, 221)", - "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px", - }, -) // Now we check we both focus and hover for toggles. move-cursor-to: "#auto-hide-large-items" focus: "#auto-hide-large-items" @@ -170,24 +145,12 @@ assert-css: ( "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px", }, ) -move-cursor-to: "#use-system-theme" -focus: "#use-system-theme" -assert-css: ( - "#use-system-theme", - { - "background-color": "rgba(0, 0, 0, 0)", - "border-color": "rgb(33, 150, 243)", - "box-shadow": "rgb(33, 150, 243) 0px 0px 1px 1px", - }, -) // We now switch the display. -click: "#use-system-theme" +click: "#theme-system-preference" // Wait for the hidden element to show up. wait-for: ".setting-line:not(.hidden) #preferred-dark-theme" assert: ".setting-line:not(.hidden) #preferred-light-theme" -// Check that the theme picking is hidden. -assert: ".setting-line.hidden #theme" // We check their text as well. assert-text: ("#preferred-dark-theme .setting-name", "Preferred dark theme")