Add browser tests for quickly hovering links

Bug: T219434
Change-Id: I3597b8025f7a12db0cf5d83cce5a77abace9bae3
This commit is contained in:
WMDE-Fisch 2019-04-02 13:04:27 +02:00
parent 065a8e9631
commit 69caa6ec3d
2 changed files with 13 additions and 1 deletions

View file

@ -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 ) {

View file

@ -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.' );
} );
} );