Skip to content

Commit f0371d1

Browse files
committed
rustdoc: update test cases for .sidebar-title -> .sidebar-elems h3
1 parent e9b2922 commit f0371d1

10 files changed

+23
-23
lines changed

src/test/rustdoc-gui/sidebar-mobile.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ click: ".sidebar-menu-toggle"
1313
assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
1414
// Force the sidebar open by focusing a link inside it.
1515
// This makes it easier for keyboard users to get to it.
16-
focus: ".sidebar-title a"
16+
focus: ".sidebar-elems h3 a"
1717
assert-css: (".sidebar", {"display": "block", "left": "0px"})
1818
// When we tab out of the sidebar, close it.
1919
focus: ".search-input"

src/test/rustdoc/associated-consts.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub trait Trait {
99
pub struct Bar;
1010

1111
// @has 'foo/struct.Bar.html'
12-
// @!has - '//h3[@class="sidebar-title"]' 'Associated Constants'
12+
// @!has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants'
1313
// @!has - '//div[@class="sidebar-elems"]//a' 'FOO'
1414
impl Trait for Bar {
1515
const FOO: u32 = 1;
@@ -22,7 +22,7 @@ pub enum Foo {
2222
}
2323

2424
// @has 'foo/enum.Foo.html'
25-
// @!has - '//h3[@class="sidebar-title"]' 'Associated Constants'
25+
// @!has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants'
2626
// @!has - '//div[@class="sidebar-elems"]//a' 'FOO'
2727
impl Trait for Foo {
2828
const FOO: u32 = 1;
@@ -33,7 +33,7 @@ impl Trait for Foo {
3333
pub struct Baz;
3434

3535
// @has 'foo/struct.Baz.html'
36-
// @has - '//h3[@class="sidebar-title"]' 'Associated Constants'
36+
// @has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants'
3737
// @has - '//div[@class="sidebar-elems"]//a' 'FOO'
3838
impl Baz {
3939
pub const FOO: u32 = 42;
@@ -44,7 +44,7 @@ pub enum Quux {
4444
}
4545

4646
// @has 'foo/enum.Quux.html'
47-
// @has - '//h3[@class="sidebar-title"]' 'Associated Constants'
47+
// @has - '//div[@class="sidebar-elems"]//h3' 'Associated Constants'
4848
// @has - '//div[@class="sidebar-elems"]//a' 'FOO'
4949
impl Quux {
5050
pub const FOO: u32 = 42;

src/test/rustdoc/deref-recursive-pathbuf.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
// @has '-' '//*[@class="impl-items"]//*[@id="method.as_path"]' 'pub fn as_path(&self)'
88
// @has '-' '//*[@id="deref-methods-Path"]' 'Methods from Deref<Target = Path>'
99
// @has '-' '//*[@class="impl-items"]//*[@id="method.exists"]' 'pub fn exists(&self)'
10-
// @has '-' '//*[@class="sidebar-title"]/a[@href="#deref-methods-PathBuf"]' 'Methods from Deref<Target=PathBuf>'
10+
// @has '-' '//div[@class="sidebar-elems"]//h3/a[@href="#deref-methods-PathBuf"]' 'Methods from Deref<Target=PathBuf>'
1111
// @has '-' '//*[@class="sidebar-elems"]//*[@class="block"]//a[@href="#method.as_path"]' 'as_path'
12-
// @has '-' '//*[@class="sidebar-title"]/a[@href="#deref-methods-Path"]' 'Methods from Deref<Target=Path>'
12+
// @has '-' '//div[@class="sidebar-elems"]//h3/a[@href="#deref-methods-Path"]' 'Methods from Deref<Target=Path>'
1313
// @has '-' '//*[@class="sidebar-elems"]//*[@class="block"]//a[@href="#method.exists"]' 'exists'
1414

1515
#![crate_name = "foo"]

src/test/rustdoc/deref-recursive.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
// @has '-' '//*[@class="impl-items"]//*[@id="method.bar"]' 'pub fn bar(&self)'
88
// @has '-' '//*[@id="deref-methods-Baz"]' 'Methods from Deref<Target = Baz>'
99
// @has '-' '//*[@class="impl-items"]//*[@id="method.baz"]' 'pub fn baz(&self)'
10-
// @has '-' '//*[@class="sidebar-title"]/a[@href="#deref-methods-Bar"]' 'Methods from Deref<Target=Bar>'
10+
// @has '-' '//div[@class="sidebar-elems"]//h3/a[@href="#deref-methods-Bar"]' 'Methods from Deref<Target=Bar>'
1111
// @has '-' '//*[@class="sidebar-elems"]//section//a[@href="#method.bar"]' 'bar'
12-
// @has '-' '//*[@class="sidebar-title"]/a[@href="#deref-methods-Baz"]' 'Methods from Deref<Target=Baz>'
12+
// @has '-' '//div[@class="sidebar-elems"]//h3/a[@href="#deref-methods-Baz"]' 'Methods from Deref<Target=Baz>'
1313
// @has '-' '//*[@class="sidebar-elems"]//section//a[@href="#method.baz"]' 'baz'
1414

1515
#![crate_name = "foo"]

src/test/rustdoc/deref-typedef.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// @has '-' '//*[@class="impl-items"]//*[@id="method.foo_b"]' 'pub fn foo_b(&self)'
77
// @has '-' '//*[@class="impl-items"]//*[@id="method.foo_c"]' 'pub fn foo_c(&self)'
88
// @has '-' '//*[@class="impl-items"]//*[@id="method.foo_j"]' 'pub fn foo_j(&self)'
9-
// @has '-' '//*[@class="sidebar-title"]/a[@href="#deref-methods-FooJ"]' 'Methods from Deref<Target=FooJ>'
9+
// @has '-' '//div[@class="sidebar-elems"]//h3/a[@href="#deref-methods-FooJ"]' 'Methods from Deref<Target=FooJ>'
1010
// @has '-' '//*[@class="sidebar-elems"]//section//a[@href="#method.foo_a"]' 'foo_a'
1111
// @has '-' '//*[@class="sidebar-elems"]//section//a[@href="#method.foo_b"]' 'foo_b'
1212
// @has '-' '//*[@class="sidebar-elems"]//section//a[@href="#method.foo_c"]' 'foo_c'

src/test/rustdoc/escape-deref-methods.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl Deref for TitleList {
2727
}
2828

2929
// @has foo/struct.TitleList.html
30-
// @has - '//*[@class="sidebar-title"]' 'Methods from Deref<Target=Vec<Title>>'
30+
// @has - '//div[@class="sidebar-elems"]//h3' 'Methods from Deref<Target=Vec<Title>>'
3131
impl DerefMut for TitleList {
3232
fn deref_mut(&mut self) -> &mut Self::Target {
3333
&mut self.members

src/test/rustdoc/negative-impl-sidebar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
pub struct Foo;
55

66
// @has foo/struct.Foo.html
7-
// @has - '//*[@class="sidebar-title"]/a[@href="#trait-implementations"]' 'Trait Implementations'
7+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#trait-implementations"]' 'Trait Implementations'
88
// @has - '//*[@class="sidebar-elems"]//section//a' '!Sync'
99
impl !Sync for Foo {}

src/test/rustdoc/sidebar-items.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#![crate_name = "foo"]
33

44
// @has foo/trait.Foo.html
5-
// @has - '//*[@class="sidebar-title"]/a[@href="#required-methods"]' 'Required Methods'
5+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#required-methods"]' 'Required Methods'
66
// @has - '//*[@class="sidebar-elems"]//section//a' 'bar'
7-
// @has - '//*[@class="sidebar-title"]/a[@href="#provided-methods"]' 'Provided Methods'
7+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#provided-methods"]' 'Provided Methods'
88
// @has - '//*[@class="sidebar-elems"]//section//a' 'foo'
9-
// @has - '//*[@class="sidebar-title"]/a[@href="#required-associated-consts"]' 'Required Associated Constants'
9+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#required-associated-consts"]' 'Required Associated Constants'
1010
// @has - '//*[@class="sidebar-elems"]//section//a' 'FOO'
11-
// @has - '//*[@class="sidebar-title"]/a[@href="#provided-associated-consts"]' 'Provided Associated Constants'
11+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#provided-associated-consts"]' 'Provided Associated Constants'
1212
// @has - '//*[@class="sidebar-elems"]//section//a' 'BAR'
13-
// @has - '//*[@class="sidebar-title"]/a[@href="#required-associated-types"]' 'Required Associated Types'
13+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#required-associated-types"]' 'Required Associated Types'
1414
// @has - '//*[@class="sidebar-elems"]//section//a' 'Output'
15-
// @has - '//*[@class="sidebar-title"]/a[@href="#provided-associated-types"]' 'Provided Associated Types'
15+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#provided-associated-types"]' 'Provided Associated Types'
1616
// @has - '//*[@class="sidebar-elems"]//section//a' 'Extra'
1717
pub trait Foo {
1818
const FOO: usize;
@@ -25,7 +25,7 @@ pub trait Foo {
2525
}
2626

2727
// @has foo/struct.Bar.html
28-
// @has - '//*[@class="sidebar-title"]/a[@href="#fields"]' 'Fields'
28+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#fields"]' 'Fields'
2929
// @has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.f"]' 'f'
3030
// @has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.u"]' 'u'
3131
// @!has - '//*[@class="sidebar-elems"]//section//a' 'waza'
@@ -36,7 +36,7 @@ pub struct Bar {
3636
}
3737

3838
// @has foo/enum.En.html
39-
// @has - '//*[@class="sidebar-title"]/a[@href="#variants"]' 'Variants'
39+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#variants"]' 'Variants'
4040
// @has - '//*[@class="sidebar-elems"]//section//a' 'Foo'
4141
// @has - '//*[@class="sidebar-elems"]//section//a' 'Bar'
4242
pub enum En {
@@ -45,7 +45,7 @@ pub enum En {
4545
}
4646

4747
// @has foo/union.MyUnion.html
48-
// @has - '//*[@class="sidebar-title"]/a[@href="#fields"]' 'Fields'
48+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#fields"]' 'Fields'
4949
// @has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.f1"]' 'f1'
5050
// @has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.f2"]' 'f2'
5151
// @!has - '//*[@class="sidebar-elems"]//section//a' 'waza'

src/test/rustdoc/sidebar-links-to-foreign-impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#![crate_name = "foo"]
44

55
// @has foo/trait.Foo.html
6-
// @has - '//*[@class="sidebar-title"]/a[@href="#foreign-impls"]' 'Implementations on Foreign Types'
6+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#foreign-impls"]' 'Implementations on Foreign Types'
77
// @has - '//h2[@id="foreign-impls"]' 'Implementations on Foreign Types'
88
// @has - '//*[@class="sidebar-elems"]//section//a[@href="#impl-Foo-for-u32"]' 'u32'
99
// @has - '//*[@id="impl-Foo-for-u32"]//h3[@class="code-header"]' 'impl Foo for u32'

src/test/rustdoc/tuple-struct-fields-doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// @has foo/struct.Foo.html
44
// @has - '//h2[@id="fields"]' 'Tuple Fields'
5-
// @has - '//h3[@class="sidebar-title"]/a[@href="#fields"]' 'Tuple Fields'
5+
// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#fields"]' 'Tuple Fields'
66
// @has - '//*[@id="structfield.0"]' '0: u32'
77
// @has - '//*[@id="main-content"]/div[@class="docblock"]' 'hello'
88
// @!has - '//*[@id="structfield.1"]' ''

0 commit comments

Comments
 (0)