2021-06-24 07:30:01 -05:00
|
|
|
// These tests verify that labels like "UNIX" and "Deprecated" stay on the same line as their symbol.
|
|
|
|
// It also verifies the staggered layout on mobile.
|
|
|
|
goto: file://|DOC_PATH|/test_docs/index.html
|
|
|
|
|
|
|
|
// Desktop view
|
|
|
|
size: (1080, 600)
|
|
|
|
assert: (".stab.deprecated")
|
|
|
|
assert: (".stab.portability")
|
|
|
|
|
2022-07-27 00:11:21 -05:00
|
|
|
// make sure that deprecated and portability have the right colors
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
|
|
|
".item-table .item-left .stab.deprecated",
|
2022-07-27 00:11:21 -05:00
|
|
|
{ "background-color": "rgb(255, 245, 214)" },
|
2021-12-12 11:28:58 -06:00
|
|
|
)
|
|
|
|
assert-css: (
|
|
|
|
".item-table .item-left .stab.portability",
|
2022-07-27 00:11:21 -05:00
|
|
|
{ "background-color": "rgb(255, 245, 214)" },
|
2021-12-12 11:28:58 -06:00
|
|
|
)
|
2021-06-24 07:30:01 -05:00
|
|
|
|
|
|
|
// table like view
|
|
|
|
assert-css: (".item-right.docblock-short", { "padding-left": "0px" })
|
2021-12-12 11:28:58 -06:00
|
|
|
compare-elements-position-near: (
|
|
|
|
"//*[@class='item-left module-item']//a[text()='replaced_function']",
|
|
|
|
".item-left .stab.deprecated",
|
|
|
|
{"y": 2},
|
|
|
|
)
|
|
|
|
compare-elements-position: (
|
|
|
|
".item-left .stab.deprecated",
|
|
|
|
".item-left .stab.portability",
|
|
|
|
("y"),
|
|
|
|
)
|
2021-06-24 07:30:01 -05:00
|
|
|
|
|
|
|
// Ensure no wrap
|
2021-12-12 11:28:58 -06:00
|
|
|
compare-elements-position: (
|
|
|
|
"//*[@class='item-left module-item']//a[text()='replaced_function']/..",
|
2022-09-13 16:22:38 -05:00
|
|
|
"//*[@class='item-right docblock-short'][text()='a thing with a label']",
|
2021-12-12 11:28:58 -06:00
|
|
|
("y"),
|
|
|
|
)
|
2021-06-24 07:30:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
// Mobile view
|
|
|
|
size: (600, 600)
|
|
|
|
// staggered layout with 2em spacing
|
|
|
|
assert-css: (".item-right.docblock-short", { "padding-left": "32px" })
|
2021-12-12 11:28:58 -06:00
|
|
|
compare-elements-position-near: (
|
|
|
|
"//*[@class='item-left module-item']//a[text()='replaced_function']",
|
|
|
|
".item-left .stab.deprecated",
|
2022-07-27 00:11:21 -05:00
|
|
|
{"y": 2},
|
2021-12-12 11:28:58 -06:00
|
|
|
)
|
|
|
|
compare-elements-position: (
|
|
|
|
".item-left .stab.deprecated",
|
|
|
|
".item-left .stab.portability",
|
|
|
|
("y"),
|
|
|
|
)
|
2021-06-24 07:30:01 -05:00
|
|
|
|
|
|
|
// Ensure wrap
|
2021-12-12 11:28:58 -06:00
|
|
|
compare-elements-position-false: (
|
|
|
|
"//*[@class='item-left module-item']//a[text()='replaced_function']/..",
|
2022-09-13 16:22:38 -05:00
|
|
|
"//*[@class='item-right docblock-short'][text()='a thing with a label']",
|
2021-12-12 11:28:58 -06:00
|
|
|
("y"),
|
|
|
|
)
|
|
|
|
compare-elements-position-false: (
|
|
|
|
".item-left .stab.deprecated",
|
2022-09-13 16:22:38 -05:00
|
|
|
"//*[@class='item-right docblock-short'][text()='a thing with a label']",
|
2021-12-12 11:28:58 -06:00
|
|
|
("y"),
|
|
|
|
)
|