|
| 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 |
| 4 | + |
| 5 | +// Desktop view |
| 6 | +size: (1080, 600) |
| 7 | +assert: (".stab.deprecated") |
| 8 | +assert: (".stab.portability") |
| 9 | + |
| 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)" }) |
| 13 | + |
| 14 | +// table like view |
| 15 | +assert-css: (".item-right.docblock-short", { "padding-left": "0px" }) |
| 16 | +// Requires new function: https://github.com/GuillaumeGomez/browser-UI-test/pull/202 |
| 17 | +//compare-elements-position-near: ("//*[@class='item-left module-item']//a[text()='replaced_function']", ".item-left .stab.deprecated", ("y")) |
| 18 | +compare-elements-position: (".item-left .stab.deprecated", ".item-left .stab.portability", ("y")) |
| 19 | + |
| 20 | +// Ensure no wrap |
| 21 | +//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")) |
| 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")) |
| 23 | + |
| 24 | + |
| 25 | +// Mobile view |
| 26 | +size: (600, 600) |
| 27 | +// staggered layout with 2em spacing |
| 28 | +assert-css: (".item-right.docblock-short", { "padding-left": "32px" }) |
| 29 | +// Requires new function: https://github.com/GuillaumeGomez/browser-UI-test/pull/202 |
| 30 | +//compare-elements-position-near: ("//*[@class='item-left module-item']//a[text()='replaced_function']", ".item-left .stab.deprecated", ("y")) |
| 31 | +compare-elements-position: (".item-left .stab.deprecated", ".item-left .stab.portability", ("y")) |
| 32 | + |
| 33 | +// Ensure wrap |
| 34 | +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")) |
| 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")) |
0 commit comments