rust/tests/rustdoc-gui/utils.goml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
546 B
Plaintext
Raw 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 10:14:41 +00: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|}
},
)