mediawiki-extensions-Revisi.../tests/selenium/specs/help.js
Svantje Lilienthal 7649e6c0f3 ported help.feature from ruby to node.js
Change-Id: Ia9d86b50ab0f555e4c32093b45430182bc68f2eb
2020-11-17 11:03:45 +00:00

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'
);
} );
} );