rust/tests/rustdoc-gui/utils.goml

19 lines
546 B
Plaintext
Raw Permalink Normal View History

// This file contains code to be re-used by other tests.
define-function: (
"switch-theme",
[theme],
block {
// Set the theme.
2024-04-08 05:14:41 -05:00
// Open the settings menu.
click: "#settings-menu"
// Wait for the popover to appear...
wait-for: "#settings"
// Change the setting.
click: "#theme-"+ |theme|
// Close the popover.
click: "#settings-menu"
// Ensure that the local storage was correctly updated.
assert-local-storage: {"rustdoc-theme": |theme|}
},
)