@@ -29,6 +29,23 @@ assert-css: (
2929 {"color": "rgb(120, 135, 151)"},
3030)
3131
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+
3249// Dark theme
3350local-storage: {
3451 "rustdoc-theme": "dark",
@@ -54,6 +71,23 @@ assert-css: (
5471 {"color": "rgb(221, 221, 221)"},
5572)
5673
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+
5791// Light theme
5892local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
5993reload:
@@ -75,6 +109,23 @@ assert-css: (
75109 {"color": "rgb(0, 0, 0)"},
76110)
77111
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+
78129// Check the alias more specifically in the dark theme.
79130goto: file://|DOC_PATH|/test_docs/index.html
80131// We set the theme so we're sure that the correct values will be used, whatever the computer
0 commit comments