diff --git a/src/test/rustdoc-gui/anchors.goml b/src/test/rustdoc-gui/anchors.goml index 84b8bbd1b32..44047e81dac 100644 --- a/src/test/rustdoc-gui/anchors.goml +++ b/src/test/rustdoc-gui/anchors.goml @@ -1,5 +1,5 @@ // 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 // 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: (".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: (".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" -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)"}) diff --git a/src/test/rustdoc-gui/headings.goml b/src/test/rustdoc-gui/headings.goml index 8c2c3df1588..ed07e777b18 100644 --- a/src/test/rustdoc-gui/headings.goml +++ b/src/test/rustdoc-gui/headings.goml @@ -247,12 +247,12 @@ assert-css: ( local-storage: {"rustdoc-theme": "light"} 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"} reload: -assert-css: (".since", {"color": "rgb(128, 128, 128)"}) +assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL) local-storage: {"rustdoc-theme": "ayu"} reload: -assert-css: (".since", {"color": "rgb(128, 128, 128)"}) +assert-css: (".since", {"color": "rgb(128, 128, 128)"}, ALL) diff --git a/src/test/rustdoc-gui/src/staged_api/Cargo.toml b/src/test/rustdoc-gui/src/staged_api/Cargo.toml index 117c4134e34..b231be6eee9 100644 --- a/src/test/rustdoc-gui/src/staged_api/Cargo.toml +++ b/src/test/rustdoc-gui/src/staged_api/Cargo.toml @@ -7,5 +7,6 @@ edition = "2021" path = "lib.rs" [features] -default = ["some_feature"] +default = ["some_feature", "some_other_feature"] some_feature = [] +some_other_feature = [] diff --git a/src/test/rustdoc-gui/src/staged_api/lib.rs b/src/test/rustdoc-gui/src/staged_api/lib.rs index 0cb460f03f7..5934593a899 100644 --- a/src/test/rustdoc-gui/src/staged_api/lib.rs +++ b/src/test/rustdoc-gui/src/staged_api/lib.rs @@ -7,4 +7,6 @@ pub struct Foo {} impl Foo { #[stable(feature = "some_feature", since = "1.3.5")] pub fn bar() {} + #[stable(feature = "some_other_feature", since = "1.3.6")] + pub fn yo() {} }