Skip to content

Commit

Permalink
Add regression test for hamberger button color in mobile sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 5, 2022
1 parent 48b2a5d commit d7f357d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/rustdoc-gui/sidebar-mobile.goml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,24 @@ scroll-to: ".block.keyword li:nth-child(1)"
compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topbar", {"y": 543})

// Now checking the background color of the sidebar.
show-text: true
local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
reload:

// Open the sidebar menu.
click: ".sidebar-menu-toggle"
assert-css: (".sidebar", {"background-color": "rgb(80, 80, 80)"})
assert-css: (".sidebar", {"background-color": "rgb(80, 80, 80)", "color": "rgb(221, 221, 221)"})

local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "ayu"}
reload:

// Open the sidebar menu.
click: ".sidebar-menu-toggle"
assert-css: (".sidebar", {"background-color": "rgb(20, 25, 31)"})
assert-css: (".sidebar", {"background-color": "rgb(20, 25, 31)", "color": "rgb(197, 197, 197)"})

local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "light"}
reload:

// Open the sidebar menu.
click: ".sidebar-menu-toggle"
assert-css: (".sidebar", {"background-color": "rgb(245, 245, 245)"})
assert-css: (".sidebar", {"background-color": "rgb(245, 245, 245)", "color": "rgb(0, 0, 0)"})

0 comments on commit d7f357d

Please sign in to comment.