Add GUI test to enforce tooltip position

This commit is contained in:
Guillaume Gomez 2021-03-22 22:17:43 +01:00
parent 494e29deea
commit 6c80deb4a5
2 changed files with 23 additions and 4 deletions

View 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" })

View File

@ -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() {}