2021-06-13 14:50:11 -05:00
|
|
|
// This test checks that the font weight is correctly applied.
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
|
2022-09-19 14:17:05 -05:00
|
|
|
assert-css: ("//*[@class='item-decl']//a[text()='Alias']", {"font-weight": "400"})
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
|
|
|
"//*[@class='structfield small-section-header']//a[text()='Alias']",
|
|
|
|
{"font-weight": "400"},
|
|
|
|
)
|
2021-07-25 16:41:57 -05:00
|
|
|
assert-css: ("#method\.a_method > .code-header", {"font-weight": "600"})
|
|
|
|
assert-css: ("#associatedtype\.X > .code-header", {"font-weight": "600"})
|
|
|
|
assert-css: ("#associatedconstant\.Y > .code-header", {"font-weight": "600"})
|
2021-06-26 14:38:24 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
|
2021-06-26 14:38:24 -05:00
|
|
|
assert-css: (".top-doc .docblock p", {"font-weight": "400"}, ALL)
|
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
2022-09-28 16:47:56 -05:00
|
|
|
assert-css: (".impl-items .method > .code-header", {"font-weight": "600"}, ALL)
|
2021-06-26 14:38:24 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
|
2021-08-23 12:49:56 -05:00
|
|
|
|
|
|
|
// This is a complex selector, so here's how it works:
|
|
|
|
//
|
2022-09-19 14:17:05 -05:00
|
|
|
// * //*[@class='item-decl'] — selects element of any tag with classes docblock and item-decl
|
2023-01-14 11:58:55 -06:00
|
|
|
// * /pre[@class='rust'] — selects immediate child with tag pre and class rust
|
2021-08-23 12:49:56 -05:00
|
|
|
// * /code — selects immediate child with tag code
|
|
|
|
// * /a[@class='constant'] — selects immediate child with tag a and class constant
|
|
|
|
// * //text() — selects child that is text node
|
|
|
|
// * /parent::* — selects immediate parent of the text node (the * means it can be any tag)
|
|
|
|
//
|
|
|
|
// This uses '/parent::*' as a proxy for the style of the text node.
|
|
|
|
// We can't just select the '<a>' because intermediate tags could be added.
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-count: (
|
2023-01-14 11:58:55 -06:00
|
|
|
"//*[@class='item-decl']/pre[@class='rust']/code/a[@class='constant']//text()/parent::*",
|
2021-12-12 11:28:58 -06:00
|
|
|
1,
|
|
|
|
)
|
|
|
|
assert-css: (
|
2023-01-14 11:58:55 -06:00
|
|
|
"//*[@class='item-decl']/pre[@class='rust']/code/a[@class='constant']//text()/parent::*",
|
2021-12-12 11:28:58 -06:00
|
|
|
{"font-weight": "400"},
|
|
|
|
)
|
2021-08-23 12:49:56 -05:00
|
|
|
|
2021-12-10 13:35:26 -06:00
|
|
|
assert-count: (".methods .associatedtype", 1)
|
|
|
|
assert-css: (".methods .associatedtype", {"font-weight": "600"})
|
2021-06-26 14:38:24 -05:00
|
|
|
assert-count: (".methods .constant", 1)
|
|
|
|
assert-css: (".methods .constant", {"font-weight": "600"})
|
2022-09-28 16:47:56 -05:00
|
|
|
assert-css: (".methods .method > .code-header", {"font-weight": "600"})
|