@@ -29,6 +29,23 @@ assert-css: (
29
29
{"color": "rgb(120, 135, 151)"},
30
30
)
31
31
32
+ // Checking the `<a>` container.
33
+ assert-css: (
34
+ "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
35
+ {"color": "rgb(0, 150, 207)", "background-color": "rgba(0, 0, 0, 0)"},
36
+ )
37
+
38
+ // Checking color and background on hover.
39
+ move-cursor-to: "//*[@class='desc']//*[text()='Just a normal struct.']"
40
+ assert-css: (
41
+ "//*[@class='result-name']/*[text()='test_docs::']",
42
+ {"color": "rgb(255, 255, 255)"},
43
+ )
44
+ assert-css: (
45
+ "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
46
+ {"color": "rgb(255, 255, 255)", "background-color": "rgb(60, 60, 60)"},
47
+ )
48
+
32
49
// Dark theme
33
50
local-storage: {
34
51
"rustdoc-theme": "dark",
@@ -54,6 +71,23 @@ assert-css: (
54
71
{"color": "rgb(221, 221, 221)"},
55
72
)
56
73
74
+ // Checking the `<a>` container.
75
+ assert-css: (
76
+ "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
77
+ {"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"},
78
+ )
79
+
80
+ // Checking color and background on hover.
81
+ move-cursor-to: "//*[@class='desc']//*[text()='Just a normal struct.']"
82
+ assert-css: (
83
+ "//*[@class='result-name']/*[text()='test_docs::']",
84
+ {"color": "rgb(221, 221, 221)"},
85
+ )
86
+ assert-css: (
87
+ "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
88
+ {"color": "rgb(221, 221, 221)", "background-color": "rgb(119, 119, 119)"},
89
+ )
90
+
57
91
// Light theme
58
92
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
59
93
reload:
@@ -75,6 +109,23 @@ assert-css: (
75
109
{"color": "rgb(0, 0, 0)"},
76
110
)
77
111
112
+ // Checking the `<a>` container.
113
+ assert-css: (
114
+ "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
115
+ {"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"},
116
+ )
117
+
118
+ // Checking color and background on hover.
119
+ move-cursor-to: "//*[@class='desc']//*[text()='Just a normal struct.']"
120
+ assert-css: (
121
+ "//*[@class='result-name']/*[text()='test_docs::']",
122
+ {"color": "rgb(0, 0, 0)"},
123
+ )
124
+ assert-css: (
125
+ "//*[@class='result-name']/*[text()='test_docs::']/ancestor::a",
126
+ {"color": "rgb(0, 0, 0)", "background-color": "rgb(221, 221, 221)"},
127
+ )
128
+
78
129
// Check the alias more specifically in the dark theme.
79
130
goto: file://|DOC_PATH|/test_docs/index.html
80
131
// We set the theme so we're sure that the correct values will be used, whatever the computer
0 commit comments