Skip to content

Commit f4be88e

Browse files
Add GUI tests for search input border color
1 parent b8c8250 commit f4be88e

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Ensures that the search input border color changes on focus.
2+
goto: file://|DOC_PATH|/test_docs/index.html
3+
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
4+
reload:
5+
6+
assert-css: (".search-input", {"border-color": "rgb(224, 224, 224)"})
7+
click: ".search-input"
8+
focus: ".search-input"
9+
assert-css: (".search-input", {"border-color": "rgb(0, 141, 253)"})
10+
11+
local-storage: {"rustdoc-theme": "light"}
12+
reload:
13+
14+
assert-css: (".search-input", {"border-color": "rgb(224, 224, 224)"})
15+
click: ".search-input"
16+
assert-css: (".search-input", {"border-color": "rgb(102, 175, 233)"})
17+
18+
local-storage: {"rustdoc-theme": "ayu"}
19+
reload:
20+
21+
assert-css: (".search-input", {"border-color": "rgb(66, 76, 87)"})
22+
click: ".search-input"
23+
assert-css: (".search-input", {"border-color": "rgb(66, 76, 87)"})

src/test/rustdoc-gui/search-result-display.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ assert-css: (".search-results div.desc", {"width": "570px"})
1818
size: (900, 900)
1919

2020
// First we check the current width and position.
21-
assert-css: ("#crate-search", {"width": "222px"})
21+
assert-css: ("#crate-search", {"width": "218px"})
2222
compare-elements-position-near: (
2323
"#crate-search",
2424
"#search-settings .search-results-title",

0 commit comments

Comments
 (0)