diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-27 22:14:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-27 22:14:08 +0100 |
| commit | 53cfcfbfedf2104a020b7e9de229a51562767012 (patch) | |
| tree | bff29cbc7d19838cdf8fb202ab3dc5e3678786e0 | |
| parent | 1eb62b1235fd77200e6bd967d70e83c0f2497233 (diff) | |
| parent | b19e0347453b9388266ecbcf6ec85d2c66e2f9f4 (diff) | |
| download | rust-53cfcfbfedf2104a020b7e9de229a51562767012.tar.gz rust-53cfcfbfedf2104a020b7e9de229a51562767012.zip | |
Rollup merge of #104955 - GuillaumeGomez:migrate-to-func, r=notriddle
Switch rustdoc-gui test to function call r? `@notriddle`
| -rw-r--r-- | src/test/rustdoc-gui/sidebar-mobile.goml | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/src/test/rustdoc-gui/sidebar-mobile.goml b/src/test/rustdoc-gui/sidebar-mobile.goml index 840091799a7..38d01f7f612 100644 --- a/src/test/rustdoc-gui/sidebar-mobile.goml +++ b/src/test/rustdoc-gui/sidebar-mobile.goml @@ -54,23 +54,35 @@ compare-elements-position-near: (".block.keyword li:nth-child(1)", ".mobile-topb // 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)", "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)", "color": "rgb(197, 197, 197)"}) +define-function: ( + "check-colors", + (theme, color, background), + [ + ("local-storage", {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}), + ("reload"), -local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "light"} -reload: + // Open the sidebar menu. + ("click", ".sidebar-menu-toggle"), + ("assert-css", (".sidebar", { + "background-color": |background|, + "color": |color|, + })), + ], +) -// Open the sidebar menu. -click: ".sidebar-menu-toggle" -assert-css: (".sidebar", {"background-color": "rgb(245, 245, 245)", "color": "rgb(0, 0, 0)"}) +call-function: ("check-colors", { + "theme": "ayu", + "color": "rgb(197, 197, 197)", + "background": "rgb(20, 25, 31)", +}) +call-function: ("check-colors", { + "theme": "dark", + "color": "rgb(221, 221, 221)", + "background": "rgb(80, 80, 80)", +}) +call-function: ("check-colors", { + "theme": "light", + "color": "rgb(0, 0, 0)", + "background": "rgb(245, 245, 245)", +}) |
