Skip to content

Commit

Permalink
Add GUI tests for search input border color
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 20, 2022
1 parent b8c8250 commit f4be88e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions src/test/rustdoc-gui/search-input.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Ensures that the search input border color changes on focus.
goto: file://|DOC_PATH|/test_docs/index.html
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
reload:

assert-css: (".search-input", {"border-color": "rgb(224, 224, 224)"})
click: ".search-input"
focus: ".search-input"
assert-css: (".search-input", {"border-color": "rgb(0, 141, 253)"})

local-storage: {"rustdoc-theme": "light"}
reload:

assert-css: (".search-input", {"border-color": "rgb(224, 224, 224)"})
click: ".search-input"
assert-css: (".search-input", {"border-color": "rgb(102, 175, 233)"})

local-storage: {"rustdoc-theme": "ayu"}
reload:

assert-css: (".search-input", {"border-color": "rgb(66, 76, 87)"})
click: ".search-input"
assert-css: (".search-input", {"border-color": "rgb(66, 76, 87)"})
2 changes: 1 addition & 1 deletion src/test/rustdoc-gui/search-result-display.goml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ assert-css: (".search-results div.desc", {"width": "570px"})
size: (900, 900)

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

0 comments on commit f4be88e

Please sign in to comment.