os-rust/src/test/rustdoc-gui/implementors.goml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.7 KiB
Text
Raw Normal View History

2021-07-10 21:10:14 +02:00
// The goal of this test is to check that the external trait implementors, generated with JS,
// have the same display than the "local" ones.
goto: file://|DOC_PATH|/implementors/trait.Whatever.html
assert: "#implementors-list"
// There are supposed to be two implementors listed.
assert-count: ("#implementors-list .impl", 2)
2021-07-10 21:10:14 +02:00
// Now we check that both implementors have an anchor, an ID and a similar DOM.
assert: ("#implementors-list .impl:nth-child(1) > a.anchor")
assert-attribute: ("#implementors-list .impl:nth-child(1)", {"id": "impl-Whatever-for-Struct"})
assert-attribute: ("#implementors-list .impl:nth-child(1) > a.anchor", {"href": "#impl-Whatever-for-Struct"})
assert: "#implementors-list .impl:nth-child(1) > .code-header.in-band"
2021-07-10 21:10:14 +02:00
assert: ("#implementors-list .impl:nth-child(2) > a.anchor")
assert-attribute: ("#implementors-list .impl:nth-child(2)", {"id": "impl-Whatever-1"})
assert-attribute: ("#implementors-list .impl:nth-child(2) > a.anchor", {"href": "#impl-Whatever-1"})
assert: "#implementors-list .impl:nth-child(2) > .code-header.in-band"
goto: file://|DOC_PATH|/test_docs/struct.HasEmptyTraits.html
2022-07-05 15:10:12 +02:00
compare-elements-position-near-false: (
"#impl-EmptyTrait1-for-HasEmptyTraits",
"#impl-EmptyTrait2-for-HasEmptyTraits",
{"y": 30},
)
compare-elements-position-near: (
"#impl-EmptyTrait3-for-HasEmptyTraits h3",
"#impl-EmptyTrait3-for-HasEmptyTraits .item-info",
{"y": 30},
)
// Now check that re-exports work correctly.
// There should be exactly one impl shown on both of these pages.
goto: file://|DOC_PATH|/lib2/trait.TraitToReexport.html
assert-count: ("#implementors-list .impl", 1)
goto: file://|DOC_PATH|/implementors/trait.TraitToReexport.html
2022-05-06 05:18:32 -07:00
assert-count: ("#implementors-list .impl", 1)