mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
19 lines
546 B
Plaintext
19 lines
546 B
Plaintext
// This file contains code to be re-used by other tests.
|
|
define-function: (
|
|
"switch-theme",
|
|
[theme],
|
|
block {
|
|
// Set the theme.
|
|
// 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|}
|
|
},
|
|
)
|