about summary refs log tree commit diff
path: root/tests/rustdoc-gui/utils.goml
blob: 844dc98a5374cfa798b23b51ac294c1b460b5ade (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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|}
    },
)