mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-18 18:00:44 +00:00
8a53d056be
WebdriverIO has dropped support of sync mode, hence changed to async. Update npm packages: @wdio/*, wdio-mediawiki because async mode needs at least @wdio v7.9. Remove npm packages: @wdio/dot-reporter and @wdio/sync. Bug: T300798 Change-Id: I053ea6b5fbfdcff279f4eb10cf2429155690bd72
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', function () {
|
|
|
|
before( async function () {
|
|
await DiffPage.prepareSimpleTests( 2, true );
|
|
} );
|
|
|
|
beforeEach( async function () {
|
|
DiffPage.ready();
|
|
await DiffPage.openSlider();
|
|
} );
|
|
|
|
afterEach( async function () {
|
|
await browser.refresh();
|
|
await DiffPage.toggleHelpDialog( true );
|
|
} );
|
|
|
|
it( 'tutorial is present on first load', async function () {
|
|
|
|
assert(
|
|
await DiffPage.helpDialog.isDisplayed(), 'help dialog should be visible'
|
|
);
|
|
|
|
} );
|
|
|
|
it( 'tutorial is not present after it was dismissed once', async function () {
|
|
|
|
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 function () {
|
|
|
|
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'
|
|
);
|
|
|
|
} );
|
|
|
|
} );
|