mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Add GUI tests for headings border and text color
This commit is contained in:
parent
88b137d5fe
commit
bff43d0e37
@ -9,12 +9,12 @@ reload:
|
||||
assert-text: (".top-doc .docblock > h3", "Hello")
|
||||
assert-css: (
|
||||
".top-doc .docblock > h3",
|
||||
{"border-bottom": "1px solid rgb(221, 221, 221)"},
|
||||
{"border-bottom": "1px solid rgb(210, 210, 210)"},
|
||||
)
|
||||
// We now check that the `<summary>` doesn't have a bottom border and has the correct display.
|
||||
assert-css: (
|
||||
".top-doc .docblock summary h4",
|
||||
{"border-bottom": "0px none rgb(221, 221, 221)"},
|
||||
{"border-bottom": "0px none rgb(210, 210, 210)"},
|
||||
)
|
||||
// This allows to ensure that summary is on one line only!
|
||||
assert-property: (".top-doc .docblock summary h4", {"offsetHeight": "33"})
|
||||
|
@ -150,15 +150,109 @@ assert-css: ("h2#top-doc-prose-title", {"border-bottom-width": "1px"})
|
||||
assert-css: ("h3#top-doc-prose-sub-heading", {"font-size": "20px"})
|
||||
assert-css: ("h3#top-doc-prose-sub-heading", {"border-bottom-width": "1px"})
|
||||
|
||||
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
|
||||
// Checking colors now.
|
||||
show-text: true
|
||||
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
|
||||
assert-css: (
|
||||
".top-doc .docblock h2",
|
||||
{"color": "rgb(0, 0, 0)", "border-bottom": "1px solid rgb(221, 221, 221)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h3",
|
||||
{"color": "rgb(0, 0, 0)", "border-bottom": "1px solid rgb(221, 221, 221)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h4",
|
||||
{"color": "rgb(0, 0, 0)", "border-bottom": "1px solid rgb(221, 221, 221)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h5",
|
||||
{"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h4",
|
||||
{"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h5",
|
||||
{"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h6",
|
||||
{"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
|
||||
)
|
||||
|
||||
local-storage: {"rustdoc-theme": "dark"}
|
||||
reload:
|
||||
assert-css: (
|
||||
".top-doc .docblock h2",
|
||||
{"color": "rgb(221, 221, 221)", "border-bottom": "1px solid rgb(210, 210, 210)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h3",
|
||||
{"color": "rgb(221, 221, 221)", "border-bottom": "1px solid rgb(210, 210, 210)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h4",
|
||||
{"color": "rgb(221, 221, 221)", "border-bottom": "1px solid rgb(210, 210, 210)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h5",
|
||||
{"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h4",
|
||||
{"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h5",
|
||||
{"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h6",
|
||||
{"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
|
||||
)
|
||||
|
||||
local-storage: {"rustdoc-theme": "ayu"}
|
||||
reload:
|
||||
assert-css: (
|
||||
".top-doc .docblock h2",
|
||||
{"color": "rgb(255, 255, 255)", "border-bottom": "1px solid rgb(92, 103, 115)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h2",
|
||||
{"color": "rgb(255, 255, 255)", "border-bottom": "1px solid rgb(92, 103, 115)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h4",
|
||||
{"color": "rgb(255, 255, 255)", "border-bottom": "1px solid rgb(92, 103, 115)"},
|
||||
)
|
||||
assert-css: (
|
||||
".top-doc .docblock h5",
|
||||
{"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h4",
|
||||
{"color": "rgb(255, 255, 255)", "border-bottom": "0px none rgb(92, 103, 115)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h5",
|
||||
{"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
|
||||
)
|
||||
assert-css: (
|
||||
"#implementations-list .docblock h6",
|
||||
{"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
|
||||
)
|
||||
|
||||
local-storage: {"rustdoc-theme": "light"}
|
||||
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
|
||||
assert-css: (".since", {"color": "rgb(128, 128, 128)"})
|
||||
|
||||
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||
local-storage: {"rustdoc-theme": "dark"}
|
||||
reload:
|
||||
assert-css: (".since", {"color": "rgb(128, 128, 128)"})
|
||||
|
||||
local-storage: {"rustdoc-theme": "ayu", "rustdoc-use-system-theme": "false"}
|
||||
local-storage: {"rustdoc-theme": "ayu"}
|
||||
reload:
|
||||
assert-css: (".since", {"color": "rgb(128, 128, 128)"})
|
||||
|
@ -146,6 +146,10 @@ pub use crate::repro as repro2;
|
||||
/// ### Top-doc Prose sub-sub-heading
|
||||
///
|
||||
/// Text below sub-sub-heading
|
||||
///
|
||||
/// #### You know the drill.
|
||||
///
|
||||
/// More text.
|
||||
pub struct HeavilyDocumentedStruct {
|
||||
/// # Title for field
|
||||
/// ## Sub-heading for field
|
||||
|
Loading…
Reference in New Issue
Block a user