Add test to check width of item-info

This commit is contained in:
Guillaume Gomez 2021-07-18 12:32:26 +02:00
parent d10703c616
commit 57f7501b1d
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,7 @@
// This test ensures that the item information don't take 100% of the width if unnecessary.
goto: file://|DOC_PATH|/lib2/struct.Foo.html
// We set a fixed size so there is no chance of "random" resize.
size: (1100, 800)
// We check that ".item-info" is bigger than its content.
assert-css: (".item-info", {"width": "807px"})
assert-css: (".item-info .stab", {"width": "343px"})

View File

@ -1,5 +1,7 @@
// ignore-tidy-linelength
#![feature(doc_cfg)]
pub mod module {
pub mod sub_module {
pub mod sub_sub_module {
@ -14,6 +16,7 @@ pub fn foobar() {}
pub type Alias = u32;
#[doc(cfg(feature = "foo-method"))]
pub struct Foo {
pub x: Alias,
}