mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-14 19:24:42 +00:00
Merge tooltip browser tests
No need to build up two test here with refreshing the page. Change-Id: I9bc5b44e2b92704b896edaaa03affac216b9dbce
This commit is contained in:
parent
502e207e7c
commit
95540a313c
|
@ -7,47 +7,34 @@ describe( 'RevisionSlider revision tooltips', function () {
|
|||
|
||||
before( async function () {
|
||||
await DiffPage.prepareSimpleTests( 2 );
|
||||
} );
|
||||
|
||||
beforeEach( async function () {
|
||||
DiffPage.ready();
|
||||
await DiffPage.openSlider();
|
||||
} );
|
||||
|
||||
afterEach( async function () {
|
||||
await browser.refresh();
|
||||
} );
|
||||
|
||||
it( 'should appear on hover', async function () {
|
||||
it( 'appears and remains on hovering it', async function () {
|
||||
|
||||
await DiffPage.dwellRevision( 1 );
|
||||
|
||||
assert(
|
||||
await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should appear'
|
||||
);
|
||||
assert(
|
||||
!await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should not appear'
|
||||
);
|
||||
|
||||
await DiffPage.dwellRevision( 2 );
|
||||
|
||||
assert(
|
||||
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should appear'
|
||||
);
|
||||
|
||||
assert(
|
||||
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should not appear'
|
||||
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should vanish'
|
||||
);
|
||||
|
||||
} );
|
||||
|
||||
it( 'appears and remains on hover', async function () {
|
||||
|
||||
await DiffPage.dwellRevision( 1 );
|
||||
await DiffPage.getTooltip( 1 ).moveTo();
|
||||
|
||||
await DiffPage.dwellRevision( 2 );
|
||||
await DiffPage.getTooltip( 2 ).moveTo();
|
||||
|
||||
assert(
|
||||
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should appear'
|
||||
);
|
||||
|
||||
assert(
|
||||
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should not appear'
|
||||
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should still be visible'
|
||||
);
|
||||
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue