Move item kind before the item name
This commit is contained in:
parent
7a09a688de
commit
8a35cc3ddc
6 changed files with 22 additions and 35 deletions
|
|
@ -14,7 +14,8 @@ assert-attribute: (
|
|||
"//a[@class='result-import']",
|
||||
{"href": "../test_docs/index.html#reexport.TheStdReexport"},
|
||||
)
|
||||
assert-text: ("//a[@class='result-import']", "test_docs::TheStdReexport (re-export)")
|
||||
assert-text: ("a.result-import .result-name", "test_docs::TheStdReexport")
|
||||
assert-text: ("a.result-import .type-kind", "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)"})
|
||||
|
|
@ -25,7 +26,7 @@ press-key: 'Enter'
|
|||
write: (".search-input", "AliasForTheStdReexport")
|
||||
wait-for: "//a[@class='result-import']"
|
||||
assert-text: (
|
||||
"//a[@class='result-import']",
|
||||
"a.result-import .result-name",
|
||||
"AliasForTheStdReexport - see test_docs::TheStdReexport",
|
||||
)
|
||||
// Same thing again, we click on it to ensure the background is once again set as expected.
|
||||
|
|
|
|||
|
|
@ -5,7 +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| + " .type-kind", {"color": |entry_color|})
|
||||
assert-css: (
|
||||
".result-" + |result_kind|,
|
||||
{"color": |entry_color|, "background-color": |background_color|},
|
||||
|
|
@ -19,7 +19,7 @@ define-function: (
|
|||
".result-" + |result_kind| + ":hover ." + |result_kind|,
|
||||
{"color": |hover_color|},
|
||||
)
|
||||
assert-css: (".result-" + |result_kind| + ":hover i", {"color": |default_color|})
|
||||
assert-css: (".result-" + |result_kind| + ":hover .type-kind", {"color": |hover_entry_color|})
|
||||
move-cursor-to: ".search-input"
|
||||
focus: ".result-" + |result_kind|
|
||||
assert-css: (
|
||||
|
|
@ -67,14 +67,6 @@ 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": |default_color|},
|
||||
)
|
||||
|
||||
store-value: (entry_color, "#0096cf") // color of the search entry
|
||||
store-value: (hover_entry_color, "#fff") // color of the hovered/focused search entry
|
||||
store-value: (background_color, "transparent") // background color
|
||||
|
|
@ -186,14 +178,6 @@ 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": |default_color|},
|
||||
)
|
||||
|
||||
store-value: (entry_color, "#ddd") // color of the search entry
|
||||
store-value: (hover_entry_color, "#ddd") // color of the hovered/focused search entry
|
||||
store-value: (background_color, "transparent") // background color
|
||||
|
|
@ -290,14 +274,6 @@ 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": |default_color|},
|
||||
)
|
||||
|
||||
store-value: (entry_color, "#000") // color of the search entry
|
||||
store-value: (hover_entry_color, "#000") // color of the hovered/focused search entry
|
||||
store-value: (background_color, "transparent") // background color
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ press-key: 'Enter'
|
|||
wait-for: "#crate-search"
|
||||
// The width is returned by "getComputedStyle" which returns the exact number instead of the
|
||||
// CSS rule which is "50%"...
|
||||
assert-css: (".search-results div.desc", {"width": "310px"})
|
||||
assert-size: (".search-results div.desc", {"width": 259})
|
||||
set-window-size: (600, 100)
|
||||
// As counter-intuitive as it may seem, in this width, the width is "100%", which is why
|
||||
// when computed it's larger.
|
||||
assert-css: (".search-results div.desc", {"width": "566px"})
|
||||
assert-size: (".search-results div.desc", {"width": 566})
|
||||
|
||||
// The result set is all on one line.
|
||||
assert-css: (".search-results .result-name > span", {"display": "inline"})
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ wait-for: "#search-tabs"
|
|||
// less good.
|
||||
//
|
||||
// Checking that the CSS is displaying " (keyword)" in italic.
|
||||
assert-text: (".result-keyword span.keyword + i", "(keyword)")
|
||||
assert-text: (".result-keyword .result-name", "CookieMonster (keyword)")
|
||||
assert-text: (".result-keyword .type-kind", "keyword")
|
||||
assert-text: (".result-keyword .result-name", "CookieMonster")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue