-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af5b719
commit 685be54
Showing
1 changed file
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Checks that the size popup work as expected. | ||
go-to: |DOC_PATH| + "/crate/sysinfo/latest" | ||
// By default, they're hidden. | ||
assert-css: ( | ||
"div.package-page-container div.package-menu .documented-info .size .info", | ||
{"display": "none"}, | ||
) | ||
// When we hover the parent element, it should make them appear. | ||
move-cursor-to: "div.package-page-container div.package-menu .documented-info .size" | ||
wait-for-css: ( | ||
"div.package-page-container div.package-menu .documented-info .size .info", | ||
{"display": "block"}, | ||
) | ||
// And when we move the mouse cursor away, it's hidden again. | ||
move-cursor-to: "#clipboard" | ||
assert-css: ( | ||
"div.package-page-container div.package-menu .documented-info .size .info", | ||
{"display": "none"}, | ||
) | ||
|
||
// When clicked, the popup should remain visible. | ||
click: "div.package-page-container div.package-menu .documented-info .size" | ||
wait-for-css: ( | ||
"div.package-page-container div.package-menu .documented-info .size .info", | ||
{"display": "block"}, | ||
) | ||
move-cursor-to: "#clipboard" | ||
assert-css: ( | ||
"div.package-page-container div.package-menu .documented-info .size .info", | ||
{"display": "block"}, | ||
) | ||
// Clicking somewhere else will change focus, making the popup disappear. | ||
click: "#main" | ||
wait-for-css: ( | ||
"div.package-page-container div.package-menu .documented-info .size .info", | ||
{"display": "none"}, | ||
) |