fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// This test ensures a few things for item info elements. 2go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html" 3// Ensuring that the item information don't take 100% of the width if unnecessary. 4// We set a fixed size so there is no chance of "random" resize. 5set-window-size: (1100, 800) 6// We check that ".item-info" is bigger than its content. 7assert-size: (".item-info", {"width": 840}) 8assert-size: (".item-info .stab", {"width": 289}) 9assert-position: (".item-info .stab", {"x": 245}) 10 11// Now we ensure that they're not rendered on the same line. 12go-to: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html" 13// We first ensure that there are two item info on the trait. 14assert-count: ("#main-content > .item-info .stab", 2) 15// They should not have the same `y` position! 16compare-elements-position-false: ( 17 "#main-content > .item-info .stab:nth-of-type(1)", 18 "#main-content > .item-info .stab:nth-of-type(2)", 19 ("y"), 20) 21// But they should have the same `x` position. 22compare-elements-position: ( 23 "#main-content > .item-info .stab:nth-of-type(1)", 24 "#main-content > .item-info .stab:nth-of-type(2)", 25 ("x"), 26) 27// They are supposed to have the same height too. 28compare-elements-css: ( 29 "#main-content > .item-info .stab:nth-of-type(1)", 30 "#main-content > .item-info .stab:nth-of-type(2)", 31 ["height"], 32)