Skip to content

Commit 8a7b83a

Browse files
Merge both "search-result-color" GUI tests
1 parent b751124 commit 8a7b83a

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

Diff for: src/test/rustdoc-gui/search-result-color.goml

+20
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,23 @@ assert-css: (
7474
"//*[@class='result-name']//*[text()='(keyword)']",
7575
{"color": "rgb(0, 0, 0)"},
7676
)
77+
78+
// Check the alias more specifically in the dark theme.
79+
goto: file://|DOC_PATH|/test_docs/index.html
80+
// We set the theme so we're sure that the correct values will be used, whatever the computer
81+
// this test is running on.
82+
local-storage: {
83+
"rustdoc-theme": "dark",
84+
"rustdoc-preferred-dark-theme": "dark",
85+
"rustdoc-use-system-theme": "false",
86+
}
87+
// If the text isn't displayed, the browser doesn't compute color style correctly...
88+
show-text: true
89+
// We reload the page so the local storage settings are being used.
90+
reload:
91+
write: (".search-input", "thisisanalias")
92+
// Waiting for the search results to appear...
93+
wait-for: "#titles"
94+
// Checking that the colors for the alias element are the ones expected.
95+
assert-css: (".result-name > .alias", {"color": "rgb(255, 255, 255)"})
96+
assert-css: (".result-name > .alias > .grey", {"color": "rgb(204, 204, 204)"})

Diff for: src/test/rustdoc-gui/search-result-colors.goml

-19
This file was deleted.

0 commit comments

Comments
 (0)