2020-06-22 21:49:14 +00:00
|
|
|
'use strict';
|
|
|
|
|
2019-01-21 17:11:13 +00:00
|
|
|
const assert = require( 'assert' ),
|
|
|
|
page = require( '../pageobjects/popups.page' );
|
|
|
|
|
2019-01-29 16:23:51 +00:00
|
|
|
describe( 'Dwelling on a valid page link', function () {
|
|
|
|
before( function () {
|
2019-01-21 17:11:13 +00:00
|
|
|
page.setup();
|
|
|
|
} );
|
|
|
|
|
2019-04-02 10:41:22 +00:00
|
|
|
beforeEach( function () {
|
2019-01-21 17:11:13 +00:00
|
|
|
page.open();
|
2019-04-02 10:41:22 +00:00
|
|
|
page.ready();
|
|
|
|
} );
|
|
|
|
|
|
|
|
it( 'I should see a page preview', function () {
|
2019-01-21 17:11:13 +00:00
|
|
|
page.dwellPageLink();
|
|
|
|
assert( page.seePagePreview(), 'Page preview is shown.' );
|
|
|
|
} );
|
|
|
|
|
2019-01-29 16:23:51 +00:00
|
|
|
it( 'Abandoning link hides page preview', function () {
|
2019-01-21 17:11:13 +00:00
|
|
|
page.dwellPageLink();
|
|
|
|
page.abandonLink();
|
|
|
|
assert( page.doNotSeePagePreview(), 'Page preview is kept hidden.' );
|
|
|
|
} );
|
2019-04-02 11:04:27 +00:00
|
|
|
|
|
|
|
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.' );
|
|
|
|
} );
|
2019-01-21 17:11:13 +00:00
|
|
|
} );
|