Skip to content

Commit fbd9c28

Browse files
Update GUI tests for impl blocks path changes
1 parent a5216cf commit fbd9c28

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

src/test/rustdoc-gui/docblock-table-overflow.goml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ assert-property: (".top-doc .docblock table", {"scrollWidth": "1573"})
1212

1313
// Logically, the ".docblock" and the "<p>" should have the same scroll width.
1414
compare-elements-property: (
15-
"#implementations + details .docblock",
16-
"#implementations + details .docblock > p",
15+
"#implementations-list > details .docblock",
16+
"#implementations-list > details .docblock > p",
1717
["scrollWidth"],
1818
)
19-
assert-property: ("#implementations + details .docblock", {"scrollWidth": "801"})
19+
assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "801"})
2020
// However, since there is overflow in the <table>, its scroll width is bigger.
21-
assert-property: ("#implementations + details .docblock table", {"scrollWidth": "1573"})
21+
assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1573"})

src/test/rustdoc-gui/hash-item-expansion.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.borrow
33
// In the blanket implementations list, "Borrow" is the second one, hence the ":nth(2)".
44
assert-attribute: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""})
55
// We first check that the impl block is open by default.
6-
assert-attribute: ("#implementations + details", {"open": ""})
6+
assert-attribute: ("#implementations-list details", {"open": ""})
77
// To ensure that we will click on the currently hidden method.
88
assert-text: (".sidebar-elems section .block li > a", "must_use")
99
click: ".sidebar-elems section .block li > a"
1010
// We check that the impl block was opened as expected so that we can see the method.
11-
assert-attribute: ("#implementations + details", {"open": ""})
11+
assert-attribute: ("#implementations-list > details", {"open": ""})
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This test ensures that the impl blocks are open by default.
22
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
3-
assert-attribute: ("#main-content > details.implementors-toggle", {"open": ""})
3+
assert-attribute: ("#implementations-list details.implementors-toggle", {"open": ""})

src/test/rustdoc-gui/toggle-docs-mobile.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ assert-attribute: (".top-doc", {"open": ""})
1414
// Assert the position of the toggle on the top doc block.
1515
assert-position: (".top-doc summary::before", {"x": 4})
1616
// Assert the position of the toggle on the impl block.
17-
assert-position: ("#implementations + details > summary::before", {"x": 4})
17+
assert-position: ("#implementations-list > details > summary::before", {"x": 4})
1818
// Assert the position of the toggle on a method.
1919
assert-position: (
2020
"#trait-implementations-list .impl-items .method-toggle > summary::before",

src/test/rustdoc-gui/toggle-docs.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ wait-for: 50
2424
assert-text: ("#toggle-all-docs", "[+]")
2525
// We check that all <details> are collapsed (except for the impl block ones).
2626
assert-attribute-false: ("details.rustdoc-toggle:not(.implementors-toggle)", {"open": ""}, ALL)
27-
assert-attribute: ("details.rustdoc-toggle.implementors-toggle", {"open": ""})
27+
assert-attribute: ("#implementations-list > details.implementors-toggle", {"open": ""})
2828
// We now check that the other impl blocks are collapsed.
2929
assert-attribute-false: (
3030
"#blanket-implementations-list > details.rustdoc-toggle.implementors-toggle",

src/test/rustdoc/duplicate_impls/issue-33054.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore-tidy-linelength
2+
13
// @has issue_33054/impls/struct.Foo.html
24
// @has - '//h3[@class="code-header in-band"]' 'impl Foo'
35
// @has - '//h3[@class="code-header in-band"]' 'impl Bar for Foo'

0 commit comments

Comments
 (0)