Skip to content

Commit

Permalink
rustdoc: add test case for setting-line margin on settings.html
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Jan 18, 2023
1 parent 9ee4df0 commit 34d595d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/rustdoc-gui/settings.goml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ assert-false: "#settings"
click: "#settings-menu"
wait-for: "#settings"
assert-css: ("#settings", {"display": "block"})

// Store the line margin to compare with the settings.html later.
store-css: (setting_line_margin, ".setting-line", "margin")

// Let's close it by clicking on the same button.
click: "#settings-menu"
wait-for-css: ("#settings", {"display": "none"})
Expand Down Expand Up @@ -211,6 +215,9 @@ assert-css: (".setting-line", {"position": "relative"})
assert-attribute-false: ("#settings", {"class": "popover"}, CONTAINS)
compare-elements-position: (".sub form", "#settings", ("x"))

// Check that setting-line has the same margin in this mode as in the popover.
assert-css: (".setting-line", {"margin": |setting_line_margin|})

// We now check the display with JS disabled.
assert-false: "noscript section"
javascript: false
Expand Down

0 comments on commit 34d595d

Please sign in to comment.