Skip to content

Commit

Permalink
Extend theme change GUI test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 29, 2022
1 parent fa11fb4 commit aee9eba
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/rustdoc-gui/theme-change.goml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,19 @@ click: "#theme-choices > button:last-child"
wait-for: 500
// should be the light theme so let's check the color
assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })

goto: file://|DOC_PATH|/settings.html
click: "#theme-light"
wait-for: 500
assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
assert-local-storage: { "rustdoc-theme": "light" }

click: "#theme-dark"
wait-for: 500
assert-css: ("body", { "background-color": "rgb(53, 53, 53)" })
assert-local-storage: { "rustdoc-theme": "dark" }

click: "#theme-ayu"
wait-for: 500
assert-css: ("body", { "background-color": "rgb(15, 20, 25)" })
assert-local-storage: { "rustdoc-theme": "ayu" }

0 comments on commit aee9eba

Please sign in to comment.