]>
Commit | Line | Data |
---|---|---|
136023e0 XL |
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. | |
353b0b11 | 3 | go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" |
136023e0 XL |
4 | |
5 | // Desktop view | |
353b0b11 | 6 | set-window-size: (1080, 600) |
136023e0 XL |
7 | assert: (".stab.deprecated") |
8 | assert: (".stab.portability") | |
9 | ||
f2b60f7d | 10 | // make sure that deprecated and portability have the right colors |
a2a8927a | 11 | assert-css: ( |
9ffffee4 | 12 | ".item-table .item-name .stab.deprecated", |
f2b60f7d | 13 | { "background-color": "rgb(255, 245, 214)" }, |
a2a8927a XL |
14 | ) |
15 | assert-css: ( | |
9ffffee4 | 16 | ".item-table .item-name .stab.portability", |
f2b60f7d | 17 | { "background-color": "rgb(255, 245, 214)" }, |
a2a8927a | 18 | ) |
136023e0 XL |
19 | |
20 | // table like view | |
9ffffee4 | 21 | assert-css: (".desc.docblock-short", { "padding-left": "0px" }) |
a2a8927a | 22 | compare-elements-position-near: ( |
9ffffee4 FG |
23 | "//*[@class='item-name']//a[text()='replaced_function']", |
24 | ".item-name .stab.deprecated", | |
a2a8927a XL |
25 | {"y": 2}, |
26 | ) | |
27 | compare-elements-position: ( | |
9ffffee4 FG |
28 | ".item-name .stab.deprecated", |
29 | ".item-name .stab.portability", | |
a2a8927a XL |
30 | ("y"), |
31 | ) | |
136023e0 XL |
32 | |
33 | // Ensure no wrap | |
a2a8927a | 34 | compare-elements-position: ( |
9ffffee4 FG |
35 | "//*[@class='item-name']//a[text()='replaced_function']/..", |
36 | "//*[@class='desc docblock-short'][text()='a thing with a label']", | |
a2a8927a XL |
37 | ("y"), |
38 | ) | |
136023e0 XL |
39 | |
40 | ||
41 | // Mobile view | |
353b0b11 | 42 | set-window-size: (600, 600) |
136023e0 | 43 | // staggered layout with 2em spacing |
9ffffee4 | 44 | assert-css: (".desc.docblock-short", { "padding-left": "32px" }) |
a2a8927a | 45 | compare-elements-position-near: ( |
9ffffee4 FG |
46 | "//*[@class='item-name']//a[text()='replaced_function']", |
47 | ".item-name .stab.deprecated", | |
f2b60f7d | 48 | {"y": 2}, |
a2a8927a XL |
49 | ) |
50 | compare-elements-position: ( | |
9ffffee4 FG |
51 | ".item-name .stab.deprecated", |
52 | ".item-name .stab.portability", | |
a2a8927a XL |
53 | ("y"), |
54 | ) | |
136023e0 XL |
55 | |
56 | // Ensure wrap | |
a2a8927a | 57 | compare-elements-position-false: ( |
9ffffee4 FG |
58 | "//*[@class='item-name']//a[text()='replaced_function']/..", |
59 | "//*[@class='desc docblock-short'][text()='a thing with a label']", | |
a2a8927a XL |
60 | ("y"), |
61 | ) | |
62 | compare-elements-position-false: ( | |
9ffffee4 FG |
63 | ".item-name .stab.deprecated", |
64 | "//*[@class='desc docblock-short'][text()='a thing with a label']", | |
a2a8927a XL |
65 | ("y"), |
66 | ) |