Skip to content

Commit e6a4008

Browse files
Strenghten GUI test to include extra state in selector
1 parent 6fc52c6 commit e6a4008

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/test/rustdoc-gui/sidebar-source-code-display.goml

+12-6
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,17 @@ define-function: (
4848
("assert-css", ("#sidebar-toggle > button", {"background-color": |background_toggle|})),
4949
// With focus.
5050
("focus", "#sidebar-toggle > button"),
51-
("assert-css", ("#sidebar-toggle > button", {"background-color": |background_toggle_hover|})),
51+
("assert-css", (
52+
"#sidebar-toggle > button:focus",
53+
{"background-color": |background_toggle_hover|},
54+
)),
5255
("focus", ".search-input"),
5356
// With hover.
5457
("move-cursor-to", "#sidebar-toggle > button"),
55-
("assert-css", ("#sidebar-toggle > button", {"background-color": |background_toggle_hover|})),
58+
("assert-css", (
59+
"#sidebar-toggle > button:hover",
60+
{"background-color": |background_toggle_hover|},
61+
)),
5662

5763
// Without hover or focus.
5864
("assert-css", (
@@ -62,14 +68,14 @@ define-function: (
6268
// With focus.
6369
("focus", "#source-sidebar details[open] > .files a:not(.selected)"),
6470
("wait-for-css", (
65-
"#source-sidebar details[open] > .files a:not(.selected)",
71+
"#source-sidebar details[open] > .files a:not(.selected):focus",
6672
{"color": |color_hover|, "background-color": |background_hover|},
6773
)),
6874
("focus", ".search-input"),
6975
// With hover.
7076
("move-cursor-to", "#source-sidebar details[open] > .files a:not(.selected)"),
7177
("assert-css", (
72-
"#source-sidebar details[open] > .files a:not(.selected)",
78+
"#source-sidebar details[open] > .files a:not(.selected):hover",
7379
{"color": |color_hover|, "background-color": |background_hover|},
7480
)),
7581

@@ -100,14 +106,14 @@ define-function: (
100106
// With focus.
101107
("focus", "#source-sidebar details[open] > .folders > details > summary"),
102108
("wait-for-css", (
103-
"#source-sidebar details[open] > .folders > details > summary",
109+
"#source-sidebar details[open] > .folders > details > summary:focus",
104110
{"color": |color_hover|, "background-color": |background_hover|},
105111
)),
106112
("focus", ".search-input"),
107113
// With hover.
108114
("move-cursor-to", "#source-sidebar details[open] > .folders > details > summary"),
109115
("assert-css", (
110-
"#source-sidebar details[open] > .folders > details > summary",
116+
"#source-sidebar details[open] > .folders > details > summary:hover",
111117
{"color": |color_hover|, "background-color": |background_hover|},
112118
)),
113119
],

0 commit comments

Comments
 (0)