mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
Add browser tests for quickly hovering links
Bug: T219434 Change-Id: I3597b8025f7a12db0cf5d83cce5a77abace9bae3
This commit is contained in:
parent
065a8e9631
commit
69caa6ec3d
|
@ -5,6 +5,7 @@ const
|
|||
TEST_PAGE_TITLE = 'Popups test page',
|
||||
POPUPS_SELECTOR = '.mwe-popups',
|
||||
PAGE_POPUPS_SELECTOR = '.mwe-popups-type-page',
|
||||
PAGE_POPUPS_LINK_SELECTOR = '#content ul a',
|
||||
REFERENCE_POPUPS_SELECTOR = '.mwe-popups-type-reference',
|
||||
REFERENCE_INCEPTION_LINK_SELECTOR = '.mwe-popups-type-reference .reference a',
|
||||
POPUPS_MODULE_NAME = 'ext.popups.main';
|
||||
|
@ -68,7 +69,11 @@ class PopupsPage extends Page {
|
|||
}
|
||||
|
||||
dwellPageLink() {
|
||||
this.dwellLink( '#content ul a' );
|
||||
this.dwellLink( PAGE_POPUPS_LINK_SELECTOR );
|
||||
}
|
||||
|
||||
hoverPageLink() {
|
||||
browser.moveToObject( PAGE_POPUPS_LINK_SELECTOR );
|
||||
}
|
||||
|
||||
dwellReferenceLink( num ) {
|
||||
|
|
|
@ -21,4 +21,11 @@ describe( 'Dwelling on a valid page link', function () {
|
|||
page.abandonLink();
|
||||
assert( page.doNotSeePagePreview(), 'Page preview is kept hidden.' );
|
||||
} );
|
||||
|
||||
it( 'Quickly hovering, abandoning and re-hovering a link shows page preview', function () {
|
||||
page.hoverPageLink();
|
||||
page.abandonLink();
|
||||
page.dwellPageLink();
|
||||
assert( page.seePagePreview(), 'Page preview is shown.' );
|
||||
} );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue