diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-05-17 14:45:23 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2022-05-17 14:45:23 +0200 |
| commit | 440bbce36d649a973a323ed5fd431e36f124fb59 (patch) | |
| tree | 5edc28793b41abd8b0a3ba16e7c04218db64b02d | |
| parent | 0f8b3f4caea887e75b6af32aaf45a0de4d54cad8 (diff) | |
| download | rust-440bbce36d649a973a323ed5fd431e36f124fb59.tar.gz rust-440bbce36d649a973a323ed5fd431e36f124fb59.zip | |
Add GUI test for search crate filter select CSS properties
| -rw-r--r-- | src/test/rustdoc-gui/search-filter.goml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/search-filter.goml b/src/test/rustdoc-gui/search-filter.goml index 63fb860d77a..d0b3175114c 100644 --- a/src/test/rustdoc-gui/search-filter.goml +++ b/src/test/rustdoc-gui/search-filter.goml @@ -48,3 +48,34 @@ assert-false: "#results .externcrate" // Checking that the text for the "title" is correct (the "All" comes from the "<select>"). assert-text: ("#search-settings", "Results for test in All", STARTS_WITH) + +// Checking the display of the crate filter. +// We start with the light theme. +local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} +reload: + +timeout: 2000 +wait-for: "#crate-search" +assert-css: ("#crate-search", { + "border": "1px solid rgb(224, 224, 224)", + "color": "rgb(0, 0, 0)", + "background-color": "rgb(255, 255, 255)", +}) + +// We now check the dark theme. +click: "#settings-menu" +wait-for: "#settings" +click: "#theme-dark" +wait-for-css: ("#crate-search", { + "border": "1px solid rgb(240, 240, 240)", + "color": "rgb(17, 17, 17)", + "background-color": "rgb(240, 240, 240)", +}) + +// And finally we check the ayu theme. +click: "#theme-ayu" +wait-for-css: ("#crate-search", { + "border": "1px solid rgb(66, 76, 87)", + "color": "rgb(197, 197, 197)", + "background-color": "rgb(20, 25, 32)", +}) |
