|
| 1 | +goto: "file://" + |DOC_PATH| + "/test_docs/index.html" |
| 2 | + |
| 3 | +compare-elements-property: ( |
| 4 | + "//a[@title='test_docs::safe_fn fn']/..", |
| 5 | + "//a[@title='test_docs::unsafe_fn fn']/..", |
| 6 | + ["clientHeight"] |
| 7 | +) |
| 8 | + |
| 9 | +// If the text isn't displayed, the browser doesn't compute color style correctly... |
| 10 | +show-text: true |
| 11 | + |
| 12 | +// Set the theme to dark. |
| 13 | +local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"} |
| 14 | +// We reload the page so the local storage settings are being used. |
| 15 | +reload: |
| 16 | + |
| 17 | +assert-css: (".item-left sup", { |
| 18 | + "color": "rgb(221, 221, 221)" |
| 19 | +}) |
| 20 | + |
| 21 | +// Set the theme to ayu. |
| 22 | +local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"} |
| 23 | +// We reload the page so the local storage settings are being used. |
| 24 | +reload: |
| 25 | + |
| 26 | +assert-css: (".item-left sup", { |
| 27 | + "color": "rgb(197, 197, 197)" |
| 28 | +}) |
| 29 | + |
| 30 | +// Set the theme to light. |
| 31 | +local-storage: {"rustdoc-theme": "light", "rustdoc-preferred-dark-theme": "light", "rustdoc-use-system-theme": "false"} |
| 32 | +// We reload the page so the local storage settings are being used. |
| 33 | +reload: |
| 34 | + |
| 35 | +assert-css: (".item-left sup", { |
| 36 | + "color": "rgb(0, 0, 0)" |
| 37 | +}) |
0 commit comments