about summary refs log tree commit diff
path: root/tests/rustdoc-gui/search-result-color.goml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-gui/search-result-color.goml')
-rw-r--r--tests/rustdoc-gui/search-result-color.goml45
1 files changed, 26 insertions, 19 deletions
diff --git a/tests/rustdoc-gui/search-result-color.goml b/tests/rustdoc-gui/search-result-color.goml
index fe0f6401089..e5c11651bd2 100644
--- a/tests/rustdoc-gui/search-result-color.goml
+++ b/tests/rustdoc-gui/search-result-color.goml
@@ -5,7 +5,7 @@ include: "utils.goml"
 define-function: (
     "check-search-color",
     [
-        theme, count_color, desc_color, path_color, bottom_border_color, keyword_color,
+        theme, count_color, path_color, bottom_border_color, keyword_color,
         struct_color, associatedtype_color, tymethod_color, method_color, structfield_color,
         structfield_hover_color, macro_color, fn_color, hover_path_color, hover_background,
         attribute_color, grey
@@ -22,10 +22,6 @@ define-function: (
             ALL,
         )
         assert-css: (
-            "//*[@class='desc'][normalize-space()='Just a normal struct.']",
-            {"color": |desc_color|},
-        )
-        assert-css: (
             "//*[@class='result-name']//*[normalize-space()='test_docs::']",
             {"color": |path_color|},
         )
@@ -97,16 +93,6 @@ define-function: (
             ALL,
         )
 
-        // Checking color and background on hover.
-        move-cursor-to: "//*[@class='desc'][normalize-space()='Just a normal struct.']"
-        assert-css: (
-            "//*[@class='result-name']//*[normalize-space()='test_docs::']",
-            {"color": |hover_path_color|},
-        )
-        assert-css: (
-            "//*[@class='result-name']//*[normalize-space()='test_docs::']/ancestor::a",
-            {"color": |hover_path_color|, "background-color": |hover_background|},
-        )
     }
 )
 
@@ -157,7 +143,6 @@ show-text: true
 call-function: ("check-search-color", {
     "theme": "ayu",
     "count_color": "#888",
-    "desc_color": "#c5c5c5",
     "path_color": "#0096cf",
     "bottom_border_color": "#aaa3",
     "keyword_color": "#39afd7",
@@ -179,7 +164,6 @@ call-function: ("check-search-color", {
 call-function: ("check-search-color", {
     "theme": "dark",
     "count_color": "#888",
-    "desc_color": "#ddd",
     "path_color": "#ddd",
     "bottom_border_color": "#aaa3",
     "keyword_color": "#d2991d",
@@ -201,7 +185,6 @@ call-function: ("check-search-color", {
 call-function: ("check-search-color", {
     "theme": "light",
     "count_color": "#888",
-    "desc_color": "#000",
     "path_color": "#000",
     "bottom_border_color": "#aaa3",
     "keyword_color": "#3873ad",
@@ -226,12 +209,27 @@ call-function: ("perform-search", {"query": "thisisanalias"})
 
 define-function: (
     "check-alias",
-    [theme, alias, grey],
+    [theme, alias, grey, desc_color, hover_path_color, hover_background],
     block {
         call-function: ("switch-theme", {"theme": |theme|})
         // Checking that the colors for the alias element are the ones expected.
         assert-css: (".result-name .path .alias", {"color": |alias|})
         assert-css: (".result-name .path .alias > .grey", {"color": |grey|})
+        assert-css: (
+            "//*[@class='desc'][normalize-space()='Just a normal enum.']",
+            {"color": |desc_color|},
+        )
+        // Checking color and background on hover.
+        move-cursor-to: "//*[@class='desc'][normalize-space()='Just a normal enum.']"
+        assert-css: (
+            "//*[@class='result-name']//*[normalize-space()='test_docs::']",
+            {"color": |hover_path_color|},
+        )
+        assert-css: (
+            "//*[@class='result-name']//*[normalize-space()='test_docs::']/ancestor::a",
+            {"color": |hover_path_color|, "background-color": |hover_background|},
+        )
+
     },
 )
 
@@ -239,14 +237,23 @@ call-function: ("check-alias", {
     "theme": "ayu",
     "alias": "#c5c5c5",
     "grey": "#999",
+    "desc_color": "#c5c5c5",
+    "hover_path_color": "#fff",
+    "hover_background": "#3c3c3c",
 })
 call-function: ("check-alias", {
     "theme": "dark",
     "alias": "#fff",
     "grey": "#ccc",
+    "desc_color": "#ddd",
+    "hover_path_color": "#ddd",
+    "hover_background": "#616161",
 })
 call-function: ("check-alias", {
     "theme": "light",
     "alias": "#000",
     "grey": "#999",
+    "desc_color": "#000",
+    "hover_path_color": "#000",
+    "hover_background": "#ccc",
 })