File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ // setting local-storage emulates how we detect rustdoc changing the theme, we
2
+ // only run this detection on rustdoc pages so must change there before visiting
3
+ // other pages
4
+
5
+ // on rustdoc pages we only control the .nav-container and its descendants, on
6
+ // the crate page we control the whole page
7
+
8
+ go-to: |DOC_PATH| + "/sysinfo"
9
+ set-local-storage: { "rustdoc-theme": null }
10
+ assert-css: (".nav-container", { "background-color": "rgb(255, 255, 255)" })
11
+ go-to: |DOC_PATH| + "/crate/sysinfo"
12
+ assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
13
+
14
+ go-to: |DOC_PATH| + "/sysinfo"
15
+ set-local-storage: { "rustdoc-theme": "ayu" }
16
+ assert-css: (".nav-container", { "background-color": "rgb(15, 20, 25)" })
17
+ go-to: |DOC_PATH| + "/crate/sysinfo"
18
+ assert-css: ("body", { "background-color": "rgb(15, 20, 25)" })
You can’t perform that action at this time.
0 commit comments