Add test for search result keyword extra info

This commit is contained in:
Guillaume Gomez 2021-05-21 22:53:50 +02:00
parent 4c88f0c63b
commit 45fd4bc118
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,11 @@
goto: file://|DOC_PATH|/test_docs/index.html
write: (".search-input", "CookieMonster")
// Waiting for the search results to appear...
wait-for: "#titles"
// Note: The two next assert commands could be merged as one but readability would be
// less good.
//
// Checking that the CSS is displaying " (keyword)"...
assert: (".result-name span.keyword::after", {"content": '" (keyword)"'})
// ... in italic.
assert: (".result-name span.keyword::after", {"font-style": "italic"})

View File

@ -2,6 +2,7 @@
//! documentation generated so we can test each different features.
#![crate_name = "test_docs"]
#![feature(doc_keyword)]
use std::fmt;
@ -91,3 +92,6 @@ pub fn check_list_code_block() {}
pub enum AnEnum {
WithVariants { and: usize, sub: usize, variants: usize },
}
#[doc(keyword = "CookieMonster")]
pub mod keyword {}