mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-22 19:52:43 +00:00
f5de8ee108
* eslint-config-wikimedia: 0.27.0 → 0.28.0 The following rules are failing and were disabled: * modules: * no-mixed-spaces-and-tabs * no-jquery/no-extend * implicit-arrow-linebreak * tests/qunit: * no-jquery/no-extend * grunt-stylelint: 0.19.0 → 0.20.0 * stylelint-config-wikimedia: 0.16.1 → 0.17.1 Change-Id: I3fd3c4a2cbb03d3aa4c8efb658e33d14d24cd518
59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
describe( 'RevisionSlider help', () => {
|
|
|
|
before( async () => {
|
|
await DiffPage.prepareSimpleTests( 2, true );
|
|
} );
|
|
|
|
beforeEach( async () => {
|
|
DiffPage.ready();
|
|
await DiffPage.openSlider();
|
|
} );
|
|
|
|
afterEach( async () => {
|
|
await browser.refresh();
|
|
await DiffPage.toggleHelpDialog( true );
|
|
} );
|
|
|
|
it( 'tutorial is present on first load', async () => {
|
|
|
|
assert(
|
|
await DiffPage.helpDialog.isDisplayed(), 'help dialog should be visible'
|
|
);
|
|
|
|
} );
|
|
|
|
it( 'tutorial is not present after it was dismissed once', async () => {
|
|
|
|
await DiffPage.toggleHelpDialog( false );
|
|
|
|
await browser.refresh();
|
|
await DiffPage.openSlider();
|
|
|
|
assert(
|
|
!await DiffPage.helpDialog.isDisplayed(), 'help dialog should not be present'
|
|
);
|
|
|
|
} );
|
|
|
|
it( 'tutorial sequence works', async () => {
|
|
|
|
await DiffPage.nextHelpButton.click();
|
|
await DiffPage.nextHelpButton.click();
|
|
await DiffPage.nextHelpButton.click();
|
|
|
|
await browser.refresh();
|
|
await DiffPage.openSlider();
|
|
|
|
assert(
|
|
!await DiffPage.helpDialog.isDisplayed(), 'help dialog should not be present'
|
|
);
|
|
|
|
} );
|
|
|
|
} );
|