Add GUI test for search crate filter select CSS properties
This commit is contained in:
parent
0f8b3f4cae
commit
440bbce36d
1 changed files with 31 additions and 0 deletions
|
|
@ -48,3 +48,34 @@ assert-false: "#results .externcrate"
|
|||
|
||||
// Checking that the text for the "title" is correct (the "All" comes from the "<select>").
|
||||
assert-text: ("#search-settings", "Results for test in All", STARTS_WITH)
|
||||
|
||||
// Checking the display of the crate filter.
|
||||
// We start with the light theme.
|
||||
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
timeout: 2000
|
||||
wait-for: "#crate-search"
|
||||
assert-css: ("#crate-search", {
|
||||
"border": "1px solid rgb(224, 224, 224)",
|
||||
"color": "rgb(0, 0, 0)",
|
||||
"background-color": "rgb(255, 255, 255)",
|
||||
})
|
||||
|
||||
// We now check the dark theme.
|
||||
click: "#settings-menu"
|
||||
wait-for: "#settings"
|
||||
click: "#theme-dark"
|
||||
wait-for-css: ("#crate-search", {
|
||||
"border": "1px solid rgb(240, 240, 240)",
|
||||
"color": "rgb(17, 17, 17)",
|
||||
"background-color": "rgb(240, 240, 240)",
|
||||
})
|
||||
|
||||
// And finally we check the ayu theme.
|
||||
click: "#theme-ayu"
|
||||
wait-for-css: ("#crate-search", {
|
||||
"border": "1px solid rgb(66, 76, 87)",
|
||||
"color": "rgb(197, 197, 197)",
|
||||
"background-color": "rgb(20, 25, 32)",
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue