forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#103060 - notriddle:notridddle/help-page, r=…
…GuillaumeGomez rustdoc: make the help button a link to a page This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page. Preview: http://notriddle.com/notriddle-rustdoc-demos/help-page/std/index.html
- Loading branch information
Showing
10 changed files
with
158 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// This test ensures that opening the help page in its own tab works. | ||
goto: "file://" + |DOC_PATH| + "/help.html" | ||
size: (1000, 1000) // Try desktop size first. | ||
wait-for: "#help" | ||
assert-css: ("#help", {"display": "block"}) | ||
click: "#help-button > a" | ||
assert-css: ("#help", {"display": "block"}) | ||
compare-elements-property: (".sub-container", "#help", ["offsetWidth"]) | ||
compare-elements-position: (".sub-container", "#help", ("x")) | ||
size: (500, 1000) // Try mobile next. | ||
assert-css: ("#help", {"display": "block"}) | ||
compare-elements-property: (".sub-container", "#help", ["offsetWidth"]) | ||
compare-elements-position: (".sub-container", "#help", ("x")) | ||
|
||
// This test ensures that opening the help popover without switching pages works. | ||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html" | ||
size: (1000, 1000) // Only supported on desktop. | ||
assert-false: "#help" | ||
click: "#help-button > a" | ||
assert-css: ("#help", {"display": "block"}) | ||
click: "#help-button > a" | ||
assert-css: ("#help", {"display": "none"}) | ||
compare-elements-property-false: (".sub-container", "#help", ["offsetWidth"]) | ||
compare-elements-position-false: (".sub-container", "#help", ("x")) |
Oops, something went wrong.