]> git.lizzy.rs Git - rust.git/blobdiff - src/test/rustdoc-gui/search-result-color.goml
Merge 'rust-clippy/master' into clippyup
[rust.git] / src / test / rustdoc-gui / search-result-color.goml
index ffa9362755dd7345399e2c4d043d03a9db311757..901634fe0e635a381124505e25d849499b70b398 100644 (file)
@@ -74,3 +74,23 @@ assert-css: (
     "//*[@class='result-name']//*[text()='(keyword)']",
     {"color": "rgb(0, 0, 0)"},
 )
+
+// Check the alias more specifically in the dark theme.
+goto: file://|DOC_PATH|/test_docs/index.html
+// We set the theme so we're sure that the correct values will be used, whatever the computer
+// this test is running on.
+local-storage: {
+    "rustdoc-theme": "dark",
+    "rustdoc-preferred-dark-theme": "dark",
+    "rustdoc-use-system-theme": "false",
+}
+// If the text isn't displayed, the browser doesn't compute color style correctly...
+show-text: true
+// We reload the page so the local storage settings are being used.
+reload:
+write: (".search-input", "thisisanalias")
+// Waiting for the search results to appear...
+wait-for: "#titles"
+// Checking that the colors for the alias element are the ones expected.
+assert-css: (".result-name > .alias", {"color": "rgb(255, 255, 255)"})
+assert-css: (".result-name > .alias > .grey", {"color": "rgb(204, 204, 204)"})