mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-30 17:34:54 +00:00
Add GUI test to check colors of alias in search results
This commit is contained in:
parent
e4067a30c7
commit
0fae87a24c
14
src/test/rustdoc-gui/search-result-colors.goml
Normal file
14
src/test/rustdoc-gui/search-result-colors.goml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
goto: file://|DOC_PATH|/test_docs/index.html
|
||||||
|
// We set the theme so we're sure that the corect values will be used, whatever the computer
|
||||||
|
// this test is running on.
|
||||||
|
local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||||
|
// If the text isn't displayed, the browser doesn't compute color style correctly...
|
||||||
|
show-text: true
|
||||||
|
// We reload the page so the local storage settings are being used.
|
||||||
|
reload:
|
||||||
|
write: (".search-input", "thisisanalias")
|
||||||
|
// Waiting for the search results to appear...
|
||||||
|
wait-for: "#titles"
|
||||||
|
// Checking that the colors for the alias element are the ones expected.
|
||||||
|
assert: (".result-name > .alias", {"color": "rgb(255, 255, 255)"})
|
||||||
|
assert: (".result-name > .alias > .grey", {"color": "rgb(204, 204, 204)"})
|
@ -36,6 +36,7 @@ impl Foo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Just a normal enum.
|
/// Just a normal enum.
|
||||||
|
#[doc(alias = "ThisIsAnAlias")]
|
||||||
pub enum WhoLetTheDogOut {
|
pub enum WhoLetTheDogOut {
|
||||||
/// Woof!
|
/// Woof!
|
||||||
Woof,
|
Woof,
|
||||||
|
Loading…
Reference in New Issue
Block a user