mirror of https://github.com/rust-lang/rust.git
Update rustdoc tests and add more checks for type kind colors
This commit is contained in:
parent
741d210c44
commit
7a09a688de
|
@ -14,7 +14,7 @@ assert-attribute: (
|
|||
"//a[@class='result-import']",
|
||||
{"href": "../test_docs/index.html#reexport.TheStdReexport"},
|
||||
)
|
||||
assert-text: ("//a[@class='result-import']", "test_docs::TheStdReexport")
|
||||
assert-text: ("//a[@class='result-import']", "test_docs::TheStdReexport (re-export)")
|
||||
click: "//a[@class='result-import']"
|
||||
// We check that it has the background modified thanks to the focus.
|
||||
wait-for-css: ("//*[@id='reexport.TheStdReexport']", {"background-color": "rgb(73, 74, 61)"})
|
||||
|
|
|
@ -5,6 +5,7 @@ define-function: (
|
|||
(result_kind, color, hover_color),
|
||||
block {
|
||||
assert-css: (".result-" + |result_kind| + " ." + |result_kind|, {"color": |color|}, ALL)
|
||||
assert-css: (".result-" + |result_kind| + " i", {"color": |default_color|})
|
||||
assert-css: (
|
||||
".result-" + |result_kind|,
|
||||
{"color": |entry_color|, "background-color": |background_color|},
|
||||
|
@ -18,6 +19,7 @@ define-function: (
|
|||
".result-" + |result_kind| + ":hover ." + |result_kind|,
|
||||
{"color": |hover_color|},
|
||||
)
|
||||
assert-css: (".result-" + |result_kind| + ":hover i", {"color": |default_color|})
|
||||
move-cursor-to: ".search-input"
|
||||
focus: ".result-" + |result_kind|
|
||||
assert-css: (
|
||||
|
@ -65,10 +67,12 @@ assert-css: (
|
|||
{"border-bottom-color": "#aaa3"}
|
||||
)
|
||||
|
||||
store-value: (default_color, "rgb(197, 197, 197)")
|
||||
|
||||
// Checking the color of "keyword" text.
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='(keyword)']",
|
||||
{"color": "#788797"},
|
||||
{"color": |default_color|},
|
||||
)
|
||||
|
||||
store-value: (entry_color, "#0096cf") // color of the search entry
|
||||
|
@ -182,10 +186,12 @@ assert-css: (
|
|||
{"border-bottom-color": "#aaa3"}
|
||||
)
|
||||
|
||||
store-value: (default_color, "rgb(221, 221, 221)")
|
||||
|
||||
// Checking the color for "keyword" text.
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='(keyword)']",
|
||||
{"color": "#ddd"},
|
||||
{"color": |default_color|},
|
||||
)
|
||||
|
||||
store-value: (entry_color, "#ddd") // color of the search entry
|
||||
|
@ -284,10 +290,12 @@ assert-css: (
|
|||
{"border-bottom-color": "#aaa3"}
|
||||
)
|
||||
|
||||
store-value: (default_color, "rgb(0, 0, 0)")
|
||||
|
||||
// Checking the color for "keyword" text.
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='(keyword)']",
|
||||
{"color": "#000"},
|
||||
{"color": |default_color|},
|
||||
)
|
||||
|
||||
store-value: (entry_color, "#000") // color of the search entry
|
||||
|
|
|
@ -9,5 +9,5 @@ wait-for: "#search-tabs"
|
|||
// less good.
|
||||
//
|
||||
// Checking that the CSS is displaying " (keyword)" in italic.
|
||||
assert-text: (".result-name span.keyword > i", "(keyword)")
|
||||
assert-text: (".result-name span.keyword", "CookieMonster (keyword)")
|
||||
assert-text: (".result-keyword span.keyword + i", "(keyword)")
|
||||
assert-text: (".result-keyword .result-name", "CookieMonster (keyword)")
|
||||
|
|
Loading…
Reference in New Issue