fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
962 B39 linesraw
1// Checks that the crate search filtering is handled correctly and changes the results.
2go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=sa'%3Bda'%3Bds"
3show-text: true
4
5define-function: (
6    "check-colors",
7    (theme, error_background),
8    block {
9        // Setting the theme.
10        set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
11        // We reload the page so the local storage settings are being used.
12        reload:
13
14        wait-for: "#search .error code"
15        assert-css: ("#search .error code", {"background-color": |error_background|})
16    }
17)
18
19call-function: (
20    "check-colors",
21    {
22        "theme": "ayu",
23        "error_background": "#4f4c4c",
24    },
25)
26call-function: (
27    "check-colors",
28    {
29        "theme": "dark",
30        "error_background": "#484848",
31    },
32)
33call-function: (
34    "check-colors",
35    {
36        "theme": "light",
37        "error_background": "#d0cccc",
38    },
39)