mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-13 15:58:27 +00:00
7649e6c0f3
Change-Id: Ia9d86b50ab0f555e4c32093b45430182bc68f2eb
59 lines
1.1 KiB
JavaScript
59 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
describe( 'RevisionSlider help', function () {
|
|
|
|
before( function () {
|
|
DiffPage.prepareSimpleTests( 2, true );
|
|
} );
|
|
|
|
beforeEach( function () {
|
|
DiffPage.ready();
|
|
DiffPage.openSlider();
|
|
} );
|
|
|
|
afterEach( function () {
|
|
browser.refresh();
|
|
DiffPage.toggleHelpDialog( true );
|
|
} );
|
|
|
|
it( 'tutorial is present on first load', function () {
|
|
|
|
assert(
|
|
DiffPage.helpDialog.isDisplayed(), 'help dialog should be visible'
|
|
);
|
|
|
|
} );
|
|
|
|
it( 'tutorial is not present after it was dismissed once', function () {
|
|
|
|
DiffPage.toggleHelpDialog( false );
|
|
|
|
browser.refresh();
|
|
DiffPage.openSlider();
|
|
|
|
assert(
|
|
!DiffPage.helpDialog.isDisplayed(), 'help dialog should not be present'
|
|
);
|
|
|
|
} );
|
|
|
|
it( 'tutorial sequence works', function () {
|
|
|
|
DiffPage.nextHelpButton.click();
|
|
DiffPage.nextHelpButton.click();
|
|
DiffPage.nextHelpButton.click();
|
|
|
|
browser.refresh();
|
|
DiffPage.openSlider();
|
|
|
|
assert(
|
|
!DiffPage.helpDialog.isDisplayed(), 'help dialog should not be present'
|
|
);
|
|
|
|
} );
|
|
|
|
} );
|