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#124041 - GuillaumeGomez:fix-copy-path-butto…
…n, r=notriddle Fix copy path button Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in rust-lang#123706 forgot to update the JS (it contained an image before but not anymore). I had to make some small changes in the CSS to fix the display when the button was clicked as well. r? ``@notriddle``
- Loading branch information
Showing
3 changed files
with
27 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Checks that the "copy path" button is not triggering JS error and its display | ||
// isn't broken. | ||
go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html" | ||
|
||
// First we store the size of the button before we click on it. | ||
store-size: ("#copy-path", {"width": width, "height": height}) | ||
click: "#copy-path" | ||
// We wait for the new text to appear. | ||
wait-for: "#copy-path.clicked" | ||
// We check that the size didn't change. | ||
assert-size: ("#copy-path.clicked", {"width": |width|, "height": |height|}) | ||
// We wait for the button to turn back to its original state. | ||
wait-for: "#copy-path:not(.clicked)" | ||
// We check that the size is still the same. | ||
assert-size: ("#copy-path:not(.clicked)", {"width": |width|, "height": |height|}) |