Extend GUI test to check colors for all srclink elements
This commit is contained in:
parent
29ac48dc84
commit
7220f4a738
@ -1,5 +1,5 @@
|
|||||||
// This test is to ensure that the anchors (`§`) have the expected color and position.
|
// This test is to ensure that the anchors (`§`) have the expected color and position.
|
||||||
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
|
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
|
||||||
show-text: true
|
show-text: true
|
||||||
|
|
||||||
// This is needed to ensure that the text color is computed.
|
// This is needed to ensure that the text color is computed.
|
||||||
@ -13,10 +13,31 @@ reload:
|
|||||||
assert-css: ("#toggle-all-docs", {"color": "rgb(0, 0, 0)"})
|
assert-css: ("#toggle-all-docs", {"color": "rgb(0, 0, 0)"})
|
||||||
assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(0, 0, 0)"})
|
assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgb(0, 0, 0)"})
|
||||||
assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(173, 55, 138)"})
|
assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgb(173, 55, 138)"})
|
||||||
assert-css: (".srclink", {"color": "rgb(56, 115, 173)"})
|
assert-css: (
|
||||||
|
".rightside .srclink",
|
||||||
|
{"color": "rgb(56, 115, 173)", "text-decoration": "none solid rgb(56, 115, 173)"},
|
||||||
|
ALL,
|
||||||
|
)
|
||||||
|
compare-elements-css: (".rightside .srclink", ".rightside.srclink", ["color", "text-decoration"])
|
||||||
|
compare-elements-css: (".main-heading .srclink", ".rightside.srclink", ["color", "text-decoration"])
|
||||||
|
|
||||||
move-cursor-to: ".main-heading .srclink"
|
move-cursor-to: ".main-heading .srclink"
|
||||||
assert-css: (".srclink", {"text-decoration": "underline solid rgb(56, 115, 173)"})
|
assert-css: (
|
||||||
|
".main-heading .srclink",
|
||||||
|
{"color": "rgb(56, 115, 173)", "text-decoration": "underline solid rgb(56, 115, 173)"},
|
||||||
|
)
|
||||||
|
move-cursor-to: ".impl-items .rightside .srclink"
|
||||||
|
assert-css: (
|
||||||
|
".impl-items .rightside .srclink",
|
||||||
|
{"color": "rgb(56, 115, 173)", "text-decoration": "none solid rgb(56, 115, 173)"},
|
||||||
|
)
|
||||||
|
move-cursor-to: ".impl-items .rightside.srclink"
|
||||||
|
assert-css: (
|
||||||
|
".impl-items .rightside.srclink",
|
||||||
|
{"color": "rgb(56, 115, 173)", "text-decoration": "none solid rgb(56, 115, 173)"},
|
||||||
|
)
|
||||||
|
|
||||||
|
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
|
||||||
|
|
||||||
assert-css: ("#top-doc-prose-title", {"color": "rgb(0, 0, 0)"})
|
assert-css: ("#top-doc-prose-title", {"color": "rgb(0, 0, 0)"})
|
||||||
|
|
||||||
|
@ -247,12 +247,12 @@ assert-css: (
|
|||||||
|
|
||||||
local-storage: {"rustdoc-theme": "light"}
|
local-storage: {"rustdoc-theme": "light"}
|
||||||
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
|
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
|
||||||
assert-css: (".since", {"color": "rgb(128, 128, 128)"})
|
assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL)
|
||||||
|
|
||||||
local-storage: {"rustdoc-theme": "dark"}
|
local-storage: {"rustdoc-theme": "dark"}
|
||||||
reload:
|
reload:
|
||||||
assert-css: (".since", {"color": "rgb(128, 128, 128)"})
|
assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL)
|
||||||
|
|
||||||
local-storage: {"rustdoc-theme": "ayu"}
|
local-storage: {"rustdoc-theme": "ayu"}
|
||||||
reload:
|
reload:
|
||||||
assert-css: (".since", {"color": "rgb(128, 128, 128)"})
|
assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL)
|
||||||
|
@ -7,5 +7,6 @@ edition = "2021"
|
|||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["some_feature"]
|
default = ["some_feature", "some_other_feature"]
|
||||||
some_feature = []
|
some_feature = []
|
||||||
|
some_other_feature = []
|
||||||
|
@ -7,4 +7,6 @@ pub struct Foo {}
|
|||||||
impl Foo {
|
impl Foo {
|
||||||
#[stable(feature = "some_feature", since = "1.3.5")]
|
#[stable(feature = "some_feature", since = "1.3.5")]
|
||||||
pub fn bar() {}
|
pub fn bar() {}
|
||||||
|
#[stable(feature = "some_other_feature", since = "1.3.6")]
|
||||||
|
pub fn yo() {}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user