Add GUI test to enforce tooltip position
This commit is contained in:
parent
494e29deea
commit
6c80deb4a5
9
src/test/rustdoc-gui/check_info_sign_position.goml
Normal file
9
src/test/rustdoc-gui/check_info_sign_position.goml
Normal file
@ -0,0 +1,9 @@
|
||||
goto: file://|DOC_PATH|/index.html
|
||||
goto: ./fn.check_list_code_block.html
|
||||
// If the codeblock is the first element of the docblock, the information tooltip must have
|
||||
// have some top margin to avoid going over the toggle (the "[+]").
|
||||
assert: (".docblock > .information > .compile_fail", { "margin-top": "16px" })
|
||||
// Checks that the other codeblocks don't have this top margin.
|
||||
assert: ("ol > li > .information > .compile_fail", { "margin-top": "0px" })
|
||||
assert: ("ol > li > .information > .ignore", { "margin-top": "0px" })
|
||||
assert: (".docblock > .information > .ignore", { "margin-top": "0px" })
|
@ -57,16 +57,26 @@ pub trait AnotherOne {
|
||||
fn func3();
|
||||
}
|
||||
|
||||
/// ```compile_fail
|
||||
/// whatever
|
||||
/// ```
|
||||
///
|
||||
/// Check for "i" signs in lists!
|
||||
///
|
||||
/// 1. elem 1
|
||||
/// 2.test 1
|
||||
/// ```compile_fail
|
||||
/// fn foo() {}
|
||||
/// ```
|
||||
/// 2. test 1
|
||||
/// ```compile_fail
|
||||
/// fn foo() {}
|
||||
/// ```
|
||||
/// 3. elem 3
|
||||
/// 4. ```ignore (it's a test)
|
||||
/// fn foo() {}
|
||||
/// ```
|
||||
/// 5. elem 5
|
||||
///
|
||||
/// Final one:
|
||||
///
|
||||
/// ```ignore (still a test)
|
||||
/// let x = 12;
|
||||
/// ```
|
||||
pub fn check_list_code_block() {}
|
||||
|
Loading…
Reference in New Issue
Block a user