1 // These tests verify that labels like "UNIX" and "Deprecated" stay on the same line as their symbol.
2 // It also verifies the staggered layout on mobile.
3 goto: file://|DOC_PATH|/test_docs/index.html
7 assert: (".stab.deprecated")
8 assert: (".stab.portability")
10 // make sure that deprecated and portability are different colours
11 assert-css: (".item-table .item-left .stab.deprecated", { "background-color": "rgb(255, 196, 196)" })
12 assert-css: (".item-table .item-left .stab.portability", { "background-color": "rgb(243, 223, 255)" })
15 assert-css: (".item-right.docblock-short", { "padding-left": "0px" })
16 compare-elements-position-near: ("//*[@class='item-left module-item']//a[text()='replaced_function']", ".item-left .stab.deprecated", {"y": 2})
17 compare-elements-position: (".item-left .stab.deprecated", ".item-left .stab.portability", ("y"))
20 compare-elements-position-near: ("//*[@class='item-left module-item']//a[text()='replaced_function']", "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", {"y": 2})
21 // compare parent elements
22 compare-elements-position: ("//*[@class='item-left module-item']//a[text()='replaced_function']/..", "//*[@class='item-right docblock-short']//p[text()='a thing with a label']/..", ("y"))
27 // staggered layout with 2em spacing
28 assert-css: (".item-right.docblock-short", { "padding-left": "32px" })
29 compare-elements-position-near: ("//*[@class='item-left module-item']//a[text()='replaced_function']", ".item-left .stab.deprecated", {"y": 1})
30 compare-elements-position: (".item-left .stab.deprecated", ".item-left .stab.portability", ("y"))
33 compare-elements-position-near-false: ("//*[@class='item-left module-item']//a[text()='replaced_function']", "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", {"y": 12})
34 // compare parent elements
35 compare-elements-position-false: ("//*[@class='item-left module-item']//a[text()='replaced_function']/..", "//*[@class='item-right docblock-short']//p[text()='a thing with a label']/..", ("y"))
36 compare-elements-position-false: (".item-left .stab.deprecated", "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", ("y"))