Skip to content

Commit 4597362

Browse files
Add test to check that font-weight is correctly set on type page
1 parent 570ba09 commit 4597362

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/test/rustdoc-gui/sidebar.goml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ assert: (".sidebar-elems > .items > ul > li:nth-child(2)", "Structs")
1111
assert: (".sidebar-elems > .items > ul > li:nth-child(3)", "Enums")
1212
assert: (".sidebar-elems > .items > ul > li:nth-child(4)", "Traits")
1313
assert: (".sidebar-elems > .items > ul > li:nth-child(5)", "Functions")
14-
assert: (".sidebar-elems > .items > ul > li:nth-child(6)", "Keywords")
14+
assert: (".sidebar-elems > .items > ul > li:nth-child(6)", "Type Definitions")
15+
assert: (".sidebar-elems > .items > ul > li:nth-child(7)", "Keywords")
1516
assert: ("#structs + table td > a", "Foo")
1617
click: "#structs + table td > a"
1718

src/test/rustdoc-gui/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,6 @@ pub enum AnEnum {
9696

9797
#[doc(keyword = "CookieMonster")]
9898
pub mod keyword {}
99+
100+
/// Just some type alias.
101+
pub type SomeType = u32;

src/test/rustdoc-gui/type-weight.rs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
goto: file://|DOC_PATH|/test_docs/type.SomeType.html
2+
assert-all: (".top-block .docblock p", {"font-weight": "400"})

0 commit comments

Comments
 (0)