2021-06-24 12:30:01 +00: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.
|
2022-10-07 18:17:05 +00:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2021-06-24 12:30:01 +00:00
|
|
|
|
|
|
|
// Desktop view
|
|
|
|
size: (1080, 600)
|
|
|
|
assert: (".stab.deprecated")
|
|
|
|
assert: (".stab.portability")
|
|
|
|
|
2022-07-27 05:11:21 +00:00
|
|
|
// make sure that deprecated and portability have the right colors
|
2021-12-12 17:28:58 +00:00
|
|
|
assert-css: (
|
2023-02-08 02:00:18 +00:00
|
|
|
".item-table .item-name .stab.deprecated",
|
2022-07-27 05:11:21 +00:00
|
|
|
{ "background-color": "rgb(255, 245, 214)" },
|
2021-12-12 17:28:58 +00:00
|
|
|
)
|
|
|
|
assert-css: (
|
2023-02-08 02:00:18 +00:00
|
|
|
".item-table .item-name .stab.portability",
|
2022-07-27 05:11:21 +00:00
|
|
|
{ "background-color": "rgb(255, 245, 214)" },
|
2021-12-12 17:28:58 +00:00
|
|
|
)
|
2021-06-24 12:30:01 +00:00
|
|
|
|
|
|
|
// table like view
|
2023-02-08 02:00:18 +00:00
|
|
|
assert-css: (".desc.docblock-short", { "padding-left": "0px" })
|
2021-12-12 17:28:58 +00:00
|
|
|
compare-elements-position-near: (
|
2023-02-08 02:00:18 +00:00
|
|
|
"//*[@class='item-name']//a[text()='replaced_function']",
|
|
|
|
".item-name .stab.deprecated",
|
2021-12-12 17:28:58 +00:00
|
|
|
{"y": 2},
|
|
|
|
)
|
|
|
|
compare-elements-position: (
|
2023-02-08 02:00:18 +00:00
|
|
|
".item-name .stab.deprecated",
|
|
|
|
".item-name .stab.portability",
|
2021-12-12 17:28:58 +00:00
|
|
|
("y"),
|
|
|
|
)
|
2021-06-24 12:30:01 +00:00
|
|
|
|
|
|
|
// Ensure no wrap
|
2021-12-12 17:28:58 +00:00
|
|
|
compare-elements-position: (
|
2023-02-08 02:00:18 +00:00
|
|
|
"//*[@class='item-name']//a[text()='replaced_function']/..",
|
|
|
|
"//*[@class='desc docblock-short'][text()='a thing with a label']",
|
2021-12-12 17:28:58 +00:00
|
|
|
("y"),
|
|
|
|
)
|
2021-06-24 12:30:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Mobile view
|
|
|
|
size: (600, 600)
|
|
|
|
// staggered layout with 2em spacing
|
2023-02-08 02:00:18 +00:00
|
|
|
assert-css: (".desc.docblock-short", { "padding-left": "32px" })
|
2021-12-12 17:28:58 +00:00
|
|
|
compare-elements-position-near: (
|
2023-02-08 02:00:18 +00:00
|
|
|
"//*[@class='item-name']//a[text()='replaced_function']",
|
|
|
|
".item-name .stab.deprecated",
|
2022-07-27 05:11:21 +00:00
|
|
|
{"y": 2},
|
2021-12-12 17:28:58 +00:00
|
|
|
)
|
|
|
|
compare-elements-position: (
|
2023-02-08 02:00:18 +00:00
|
|
|
".item-name .stab.deprecated",
|
|
|
|
".item-name .stab.portability",
|
2021-12-12 17:28:58 +00:00
|
|
|
("y"),
|
|
|
|
)
|
2021-06-24 12:30:01 +00:00
|
|
|
|
|
|
|
// Ensure wrap
|
2021-12-12 17:28:58 +00:00
|
|
|
compare-elements-position-false: (
|
2023-02-08 02:00:18 +00:00
|
|
|
"//*[@class='item-name']//a[text()='replaced_function']/..",
|
|
|
|
"//*[@class='desc docblock-short'][text()='a thing with a label']",
|
2021-12-12 17:28:58 +00:00
|
|
|
("y"),
|
|
|
|
)
|
|
|
|
compare-elements-position-false: (
|
2023-02-08 02:00:18 +00:00
|
|
|
".item-name .stab.deprecated",
|
|
|
|
"//*[@class='desc docblock-short'][text()='a thing with a label']",
|
2021-12-12 17:28:58 +00:00
|
|
|
("y"),
|
|
|
|
)
|