2021-06-13 19:50:11 +00:00
|
|
|
goto: file://|DOC_PATH|/lib2/struct.Foo.html
|
|
|
|
// This test checks that the font weight is correctly applied.
|
2021-10-18 12:49:25 +00:00
|
|
|
assert-css: ("//*[@class='docblock item-decl']//a[text()='Alias']", {"font-weight": "400"})
|
2021-06-19 10:56:55 +00:00
|
|
|
assert-css: ("//*[@class='structfield small-section-header']//a[text()='Alias']", {"font-weight": "400"})
|
2021-07-25 21:41:57 +00: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 19:38:24 +00:00
|
|
|
|
|
|
|
goto: file://|DOC_PATH|/test_docs/type.SomeType.html
|
|
|
|
assert-css: (".top-doc .docblock p", {"font-weight": "400"}, ALL)
|
|
|
|
|
|
|
|
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
|
|
|
|
assert-css: (".impl-items .method", {"font-weight": "600"}, ALL)
|
|
|
|
|
|
|
|
goto: file://|DOC_PATH|/lib2/trait.Trait.html
|
2021-08-23 17:49:56 +00:00
|
|
|
|
|
|
|
// This is a complex selector, so here's how it works:
|
|
|
|
//
|
2021-10-18 12:49:25 +00:00
|
|
|
// * //*[@class='docblock item-decl'] — selects element of any tag with classes docblock and item-decl
|
2021-08-23 17:49:56 +00:00
|
|
|
// * /pre[@class='rust trait'] — selects immediate child with tag pre and classes rust and trait
|
|
|
|
// * /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-10-18 12:49:25 +00:00
|
|
|
assert-count: ("//*[@class='docblock item-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*", 1)
|
|
|
|
assert-css: ("//*[@class='docblock item-decl']/pre[@class='rust trait']/code/a[@class='constant']//text()/parent::*", {"font-weight": "400"})
|
2021-08-23 17:49:56 +00:00
|
|
|
|
2021-06-26 19:38:24 +00:00
|
|
|
assert-count: (".methods .type", 1)
|
|
|
|
assert-css: (".methods .type", {"font-weight": "600"})
|
|
|
|
assert-count: (".methods .constant", 1)
|
|
|
|
assert-css: (".methods .constant", {"font-weight": "600"})
|
|
|
|
assert-css: (".methods .method", {"font-weight": "600"})
|