-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
10 changed files
with
128 additions
and
47 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")) |
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