File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ // This test ensures that code blocks buttons are displayed on hover and when you click on them.
2+ go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
3+
4+ // First we check we "hover".
5+ move-cursor-to: ".example-wrap"
6+ assert-css: (".example-wrap .copy-button", { "visibility": "visible" })
7+ move-cursor-to: ".search-input"
8+ assert-css: (".example-wrap .copy-button", { "visibility": "hidden" })
9+
10+ // Now we check the click.
11+ assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0)
12+ click: ".example-wrap"
13+ move-cursor-to: ".search-input"
14+ // It should have a new class and be visible.
15+ wait-for-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 1)
16+ wait-for-css: (".example-wrap:not(:hover) .button-holder.keep-visible", { "visibility": "visible" })
17+ // Clicking again will remove the class.
18+ click: ".example-wrap"
19+ move-cursor-to: ".search-input"
20+ assert-count: (".example-wrap:not(:hover) .button-holder.keep-visible", 0)
21+ assert-css: (".example-wrap .copy-button", { "visibility": "hidden" })
You can’t perform that action at this time.
0 commit comments