Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run "Auto-hide item contents for large items" setting test in mobile mode as well #110064

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 48 additions & 33 deletions tests/rustdoc-gui/setting-auto-hide-content-large-items.goml
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,51 @@ define-function: (
}
)

goto: "file://" + |DOC_PATH| + "/lib2/scroll_traits/trait.Iterator.html"

// We check that the setting is enabled by default and is working.
call-function: ("check-setting", {
"storage_value": null,
"setting_attribute_value": "true",
"toggle_attribute_value": null,
})

// Now we change its value.
click: "#auto-hide-large-items"
assert-local-storage: {"rustdoc-auto-hide-large-items": "false"}

// We check that the changes were applied as expected.
reload:

call-function: ("check-setting", {
"storage_value": "false",
"setting_attribute_value": "false",
"toggle_attribute_value": "",
})

// And now we re-enable the setting.
click: "#auto-hide-large-items"
assert-local-storage: {"rustdoc-auto-hide-large-items": "true"}

// And we check everything is back the way it was before.
reload:
call-function: ("check-setting", {
"storage_value": "true",
"setting_attribute_value": "true",
"toggle_attribute_value": null,
})
define-function: (
"check-full",
(size),
block {
goto: "file://" + |DOC_PATH| + "/lib2/scroll_traits/trait.Iterator.html"
size: |size|

// We check that the setting is enabled by default and is working.
call-function: ("check-setting", {
"storage_value": null,
"setting_attribute_value": "true",
"toggle_attribute_value": null,
})

// Now we change its value.
click: "#auto-hide-large-items"
assert-local-storage: {"rustdoc-auto-hide-large-items": "false"}

// We check that the changes were applied as expected.
reload:

call-function: ("check-setting", {
"storage_value": "false",
"setting_attribute_value": "false",
"toggle_attribute_value": "",
})

// And now we re-enable the setting.
click: "#auto-hide-large-items"
assert-local-storage: {"rustdoc-auto-hide-large-items": "true"}

// And we check everything is back the way it was before.
reload:
call-function: ("check-setting", {
"storage_value": "true",
"setting_attribute_value": "true",
"toggle_attribute_value": null,
})
// Removing the value for next test pass.
local-storage: {"rustdoc-auto-hide-large-items": null}
}
)

// First we test on desktop.
call-function: ("check-full", {"size": (900, 900)})

// Then on mobile.
call-function: ("check-full", {"size": (600, 600)})