Skip to content

Commit 6fc52c6

Browse files
Extend GUI test to include more source code elements checks
1 parent 786ec7c commit 6fc52c6

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

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

+24-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ define-function: (
4343
"#source-sidebar details[open] > .files a.selected",
4444
{"color": |color_hover|, "background-color": |background|},
4545
)),
46+
4647
// Without hover or focus.
4748
("assert-css", ("#sidebar-toggle > button", {"background-color": |background_toggle|})),
4849
// With focus.
@@ -52,7 +53,8 @@ define-function: (
5253
// With hover.
5354
("move-cursor-to", "#sidebar-toggle > button"),
5455
("assert-css", ("#sidebar-toggle > button", {"background-color": |background_toggle_hover|})),
55-
// Without hover.
56+
57+
// Without hover or focus.
5658
("assert-css", (
5759
"#source-sidebar details[open] > .files a:not(.selected)",
5860
{"color": |color|, "background-color": |background_toggle|},
@@ -70,7 +72,27 @@ define-function: (
7072
"#source-sidebar details[open] > .files a:not(.selected)",
7173
{"color": |color_hover|, "background-color": |background_hover|},
7274
)),
73-
// Without hover.
75+
76+
// Without hover or focus.
77+
("assert-css", (
78+
"#source-sidebar .dir-entry summary",
79+
{"color": |color|, "background-color": |background_toggle|},
80+
)),
81+
// With focus.
82+
("focus", "#source-sidebar .dir-entry summary"),
83+
("wait-for-css", (
84+
"#source-sidebar .dir-entry summary:focus",
85+
{"color": |color_hover|, "background-color": |background_hover|},
86+
)),
87+
("focus", ".search-input"),
88+
// With hover.
89+
("move-cursor-to", "#source-sidebar .dir-entry summary"),
90+
("assert-css", (
91+
"#source-sidebar .dir-entry summary:hover",
92+
{"color": |color_hover|, "background-color": |background_hover|},
93+
)),
94+
95+
// Without hover or focus.
7496
("assert-css", (
7597
"#source-sidebar details[open] > .folders > details > summary",
7698
{"color": |color|, "background-color": |background_toggle|},

0 commit comments

Comments
 (0)