This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ call-function: ("check-colors", {
7878set-window-size: (851, 600)
7979
8080// Check the size and count in tabs
81- assert-text: ("#search-tabs > button:nth-child(1) > .count", " (26 ) ")
81+ assert-text: ("#search-tabs > button:nth-child(1) > .count", " (27 ) ")
8282assert-text: ("#search-tabs > button:nth-child(2) > .count", " (7) ")
8383assert-text: ("#search-tabs > button:nth-child(3) > .count", " (0) ")
8484store-property: ("#search-tabs > button:nth-child(1)", {"offsetWidth": buttonWidth})
Original file line number Diff line number Diff line change @@ -691,3 +691,25 @@ impl ImplDoc {
691691impl ImplDoc {
692692 pub fn bar5 ( ) { }
693693}
694+
695+ pub trait ItemsTrait {
696+ /// You want doc, here is doc!
697+ ///
698+ /// blablala
699+ type F ;
700+
701+ /// You want doc, here is doc!
702+ ///
703+ /// blablala
704+ const X : u32 ;
705+
706+ /// You want doc, here is doc!
707+ ///
708+ /// blablala
709+ fn foo ( ) { }
710+
711+ /// You want doc, here is doc!
712+ ///
713+ /// blablala
714+ fn bar ( ) ;
715+ }
Original file line number Diff line number Diff line change @@ -31,3 +31,29 @@ assert-attribute: (".top-doc", {"open": ""})
3131// To ensure that the toggle isn't over the text, we check that the toggle isn't clicked.
3232click: (3, 270)
3333assert-attribute: (".top-doc", {"open": ""})
34+
35+ // Same check on trait items.
36+ fail-on-request-error: false // To prevent downloads errors on "trait.impl/test_docs/trait.ItemsTrait.js"
37+ go-to: "file://" + |DOC_PATH| + "/test_docs/trait.ItemsTrait.html"
38+
39+ define-function: (
40+ "check-trait-item",
41+ [nth, text],
42+ block {
43+ store-value: (selector, ".methods:nth-of-type(" + |nth| + ") > details summary")
44+ assert-text: (|selector| + " h4", |text|)
45+ assert-position: (
46+ |selector| + "::before",
47+ {"x": 6},
48+ )
49+ },
50+ )
51+
52+ // Assert the position of the toggle on an associated const.
53+ call-function: ("check-trait-item", {"nth": 2, "text": "const X: u32"})
54+ // Assert the position of the toggle on an associated type.
55+ call-function: ("check-trait-item", {"nth": 3, "text": "type F"})
56+ // Assert the position of the toggle on an associated required method.
57+ call-function: ("check-trait-item", {"nth": 4, "text": "fn bar()"})
58+ // Assert the position of the toggle on an associated provided method.
59+ call-function: ("check-trait-item", {"nth": 5, "text": "fn foo()"})
You can’t perform that action at this time.
0 commit comments