1 // This test checks the position of the `i` for the notable traits.
2 goto: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
4 // We start with a wide screen.
6 // Checking they have the same y position.
7 compare-elements-position: (
8 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
9 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
12 // Checking they don't have the same x position.
13 compare-elements-position-false: (
14 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
15 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
18 // The `i` should be *after* the type.
20 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
24 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
27 // The tooltip should be beside the `i`
28 click: "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']"
29 compare-elements-position-near: (
30 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
31 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
34 compare-elements-position-false: (
35 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
36 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
39 // The docblock should be flush with the border.
41 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']/*[@class='docblock']",
42 {"margin-left": "0px"}
45 // Now only the `i` should be on the next line.
47 compare-elements-position-false: (
48 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
49 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
53 // Now both the `i` and the struct name should be on the next line.
55 // Checking they have the same y position.
56 compare-elements-position: (
57 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
58 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
61 // Checking they don't have the same x position.
62 compare-elements-position-false: (
63 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
64 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
67 // The `i` should be *after* the type.
69 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
73 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
77 // Checking on mobile now.
79 // Checking they have the same y position.
80 compare-elements-position: (
81 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
82 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
85 // Checking they don't have the same x position.
86 compare-elements-position-false: (
87 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
88 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
91 // The `i` should be *after* the type.
93 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
97 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
100 // The tooltip should be below `i`
101 compare-elements-position-near-false: (
102 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
103 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
106 compare-elements-position-false: (
107 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
108 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
111 compare-elements-position-near: (
112 "//*[@id='method.create_an_iterator_from_read']/parent::*",
113 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
116 // The docblock should be flush with the border.
118 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']/*[@class='docblock']",
119 {"margin-left": "0px"}
122 // Checking on very small mobile. The `i` should be on its own line.
124 compare-elements-position-false: (
125 "//*[@id='method.create_an_iterator_from_read']//a[text()='NotableStructWithLongName']",
126 "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",