mirror of https://github.com/rust-lang/rust.git
65 lines
2.7 KiB
Plaintext
65 lines
2.7 KiB
Plaintext
// ignore-tidy-linelength
|
|
|
|
// Checks that, if a type has two methods with the same name, they both get
|
|
// linked correctly.
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
|
|
|
// This should link to the inherent impl
|
|
write-into: (".search-input", "ZyxwvutMethodDisambiguation -> bool")
|
|
// To be SURE that the search will be run.
|
|
press-key: 'Enter'
|
|
// Waiting for the search results to appear...
|
|
wait-for: "#search-tabs"
|
|
// Check the disambiguated link.
|
|
assert-count: ("a.result-method", 1)
|
|
assert-attribute: ("a.result-method", {
|
|
"href": "../test_docs/struct.ZyxwvutMethodDisambiguation.html#impl-ZyxwvutMethodDisambiguation/method.method_impl_disambiguation"
|
|
})
|
|
click: "a.result-method"
|
|
wait-for: "#impl-ZyxwvutMethodDisambiguation"
|
|
assert-document-property: ({
|
|
"URL": "struct.ZyxwvutMethodDisambiguation.html#method.method_impl_disambiguation"
|
|
}, ENDS_WITH)
|
|
assert: "section:target"
|
|
|
|
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
|
|
|
// This should link to the trait impl
|
|
write-into: (".search-input", "ZyxwvutMethodDisambiguation, usize -> usize")
|
|
// To be SURE that the search will be run.
|
|
press-key: 'Enter'
|
|
// Waiting for the search results to appear...
|
|
wait-for: "#search-tabs"
|
|
// Check the disambiguated link.
|
|
assert-count: ("a.result-method", 1)
|
|
assert-attribute: ("a.result-method", {
|
|
"href": "../test_docs/struct.ZyxwvutMethodDisambiguation.html#impl-ZyxwvutTrait-for-ZyxwvutMethodDisambiguation/method.method_impl_disambiguation"
|
|
})
|
|
click: "a.result-method"
|
|
wait-for: "#impl-ZyxwvutMethodDisambiguation"
|
|
assert-document-property: ({
|
|
"URL": "struct.ZyxwvutMethodDisambiguation.html#method.method_impl_disambiguation-1"
|
|
}, ENDS_WITH)
|
|
assert: "section:target"
|
|
|
|
// Checks that, if a type has two methods with the same name,
|
|
// and if it has multiple inherent impl blocks, that the numeric
|
|
// impl block's disambiguator is also acted upon.
|
|
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=MultiImplBlockStruct->bool"
|
|
wait-for: "#search-tabs"
|
|
assert-count: ("a.result-method", 1)
|
|
assert-attribute: ("a.result-method", {
|
|
"href": "../lib2/another_mod/struct.MultiImplBlockStruct.html#impl-MultiImplBlockStruct/method.second_fn"
|
|
})
|
|
click: "a.result-method"
|
|
wait-for: "details:has(summary > #impl-MultiImplBlockStruct-1) > div section[id='method.second_fn']:target"
|
|
|
|
go-to: "file://" + |DOC_PATH| + "/lib2/index.html?search=MultiImplBlockStruct->u32"
|
|
wait-for: "#search-tabs"
|
|
assert-count: ("a.result-method", 1)
|
|
assert-attribute: ("a.result-method", {
|
|
"href": "../lib2/another_mod/struct.MultiImplBlockStruct.html#impl-MultiImplBlockTrait-for-MultiImplBlockStruct/method.second_fn"
|
|
})
|
|
click: "a.result-method"
|
|
wait-for: "details:has(summary > #impl-MultiImplBlockTrait-for-MultiImplBlockStruct) > div section[id='method.second_fn-1']:target"
|