diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/rustdoc-gui/search-result-impl-disambiguation.goml | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/rustdoc-gui/search-result-impl-disambiguation.goml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/search-result-impl-disambiguation.goml b/tests/rustdoc-gui/search-result-impl-disambiguation.goml new file mode 100644 index 000000000..6d12032e8 --- /dev/null +++ b/tests/rustdoc-gui/search-result-impl-disambiguation.goml @@ -0,0 +1,43 @@ +// 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: (".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: (".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" |