1
Fork 0

Use include command to reduce code duplication

This commit is contained in:
Guillaume Gomez 2024-04-05 21:38:55 +02:00
parent 5958f5e08f
commit 7659ef47f0
43 changed files with 112 additions and 150 deletions

View file

@ -1,4 +1,5 @@
// This test ensures that the elements in the sidebar are displayed correctly.
include: "utils.goml"
javascript: false
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
// Since the javascript is disabled, there shouldn't be a toggle.
@ -34,8 +35,7 @@ define-function: (
theme, color, color_hover, background, background_hover, background_toggle,
],
block {
set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
reload:
call-function: ("switch-theme", {"theme": |theme|})
wait-for-css: (".src .sidebar > *", {"visibility": "visible"})
assert-css: (
"#src-sidebar details[open] > .files a.selected",