rustdoc: add test case for positioning of notable trait tooltip
This commit is contained in:
parent
3dd7009f1f
commit
a7a0b360a8
@ -24,7 +24,23 @@ assert-position: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
|
||||
{"x": 951},
|
||||
)
|
||||
|
||||
// The tooltip should be beside the `i`
|
||||
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']"
|
||||
compare-elements-position-near: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
|
||||
{"y": 2}
|
||||
)
|
||||
compare-elements-position-false: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
|
||||
("x")
|
||||
)
|
||||
// The docblock should be flush with the border.
|
||||
assert-css: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']/*[@class='docblock']",
|
||||
{"margin-left": "0px"}
|
||||
)
|
||||
|
||||
// Now only the `i` should be on the next line.
|
||||
size: (1055, 600)
|
||||
@ -81,6 +97,27 @@ assert-position: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
|
||||
{"x": 289},
|
||||
)
|
||||
// The tooltip should be below `i`
|
||||
compare-elements-position-near-false: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
|
||||
{"y": 2}
|
||||
)
|
||||
compare-elements-position-false: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits']",
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
|
||||
("x")
|
||||
)
|
||||
compare-elements-position-near: (
|
||||
"//*[@id='method.create_an_iterator_from_read']/parent::*",
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']",
|
||||
{"x": 5}
|
||||
)
|
||||
// The docblock should be flush with the border.
|
||||
assert-css: (
|
||||
"//*[@id='method.create_an_iterator_from_read']//*[@class='notable-traits-tooltiptext force-tooltip']/*[@class='docblock']",
|
||||
{"margin-left": "0px"}
|
||||
)
|
||||
|
||||
// Checking on very small mobile. The `i` should be on its own line.
|
||||
size: (365, 600)
|
||||
|
Loading…
Reference in New Issue
Block a user