Move check-container-color
's code into check-search-color
function
This commit is contained in:
parent
2b1c799636
commit
53c5a69dfd
@ -81,11 +81,25 @@ define-function: (
|
||||
"hover_color": |fn_color|,
|
||||
})
|
||||
|
||||
call-function: ("check-container-color", {
|
||||
"path_color": |path_color|,
|
||||
"hover_path_color": |hover_path_color|,
|
||||
"hover_background": |hover_background|,
|
||||
})
|
||||
// Checking the `<a>` container.
|
||||
move-cursor-to: ".search-input"
|
||||
focus: ".search-input" // To ensure the `<a>` container isn't focused or hovered.
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='test_docs::']/ancestor::a",
|
||||
{"color": |path_color|, "background-color": "transparent"},
|
||||
ALL,
|
||||
)
|
||||
|
||||
// Checking color and background on hover.
|
||||
move-cursor-to: "//*[@class='desc'][text()='Just a normal struct.']"
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='test_docs::']",
|
||||
{"color": |hover_path_color|},
|
||||
)
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='test_docs::']/ancestor::a",
|
||||
{"color": |hover_path_color|, "background-color": |hover_background|},
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@ -126,32 +140,6 @@ define-function: (
|
||||
},
|
||||
)
|
||||
|
||||
define-function: (
|
||||
"check-container-color",
|
||||
[path_color, hover_path_color, hover_background],
|
||||
block {
|
||||
// Checking the `<a>` container.
|
||||
move-cursor-to: ".search-input"
|
||||
focus: ".search-input" // To ensure the `<a>` container isn't focused or hovered.
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='test_docs::']/ancestor::a",
|
||||
{"color": |path_color|, "background-color": "transparent"},
|
||||
ALL,
|
||||
)
|
||||
|
||||
// Checking color and background on hover.
|
||||
move-cursor-to: "//*[@class='desc'][text()='Just a normal struct.']"
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='test_docs::']",
|
||||
{"color": |hover_path_color|},
|
||||
)
|
||||
assert-css: (
|
||||
"//*[@class='result-name']//*[text()='test_docs::']/ancestor::a",
|
||||
{"color": |hover_path_color|, "background-color": |hover_background|},
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=coo"
|
||||
|
||||
// This is needed so that the text color is computed.
|
||||
|
Loading…
Reference in New Issue
Block a user