2020-11-17 09:53:46 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const assert = require( 'assert' ),
|
|
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
describe( 'RevisionSlider help', () => {
|
2020-11-17 09:53:46 +00:00
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
before( async () => {
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.prepareSimpleTests( 2, true );
|
2020-11-17 09:53:46 +00:00
|
|
|
} );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
beforeEach( async () => {
|
2020-11-17 09:53:46 +00:00
|
|
|
DiffPage.ready();
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.openSlider();
|
2020-11-17 09:53:46 +00:00
|
|
|
} );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
afterEach( async () => {
|
2023-03-29 20:23:48 +00:00
|
|
|
await browser.refresh();
|
|
|
|
await DiffPage.toggleHelpDialog( true );
|
2020-11-17 09:53:46 +00:00
|
|
|
} );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
it( 'tutorial is present on first load', async () => {
|
2020-11-17 09:53:46 +00:00
|
|
|
|
|
|
|
assert(
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.helpDialog.isDisplayed(), 'help dialog should be visible'
|
2020-11-17 09:53:46 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
it( 'tutorial is not present after it was dismissed once', async () => {
|
2020-11-17 09:53:46 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.toggleHelpDialog( false );
|
2020-11-17 09:53:46 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await browser.refresh();
|
|
|
|
await DiffPage.openSlider();
|
2020-11-17 09:53:46 +00:00
|
|
|
|
|
|
|
assert(
|
2023-03-29 20:23:48 +00:00
|
|
|
!await DiffPage.helpDialog.isDisplayed(), 'help dialog should not be present'
|
2020-11-17 09:53:46 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
it( 'tutorial sequence works', async () => {
|
2020-11-17 09:53:46 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.nextHelpButton.click();
|
|
|
|
await DiffPage.nextHelpButton.click();
|
|
|
|
await DiffPage.nextHelpButton.click();
|
2020-11-17 09:53:46 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await browser.refresh();
|
|
|
|
await DiffPage.openSlider();
|
2020-11-17 09:53:46 +00:00
|
|
|
|
|
|
|
assert(
|
2023-03-29 20:23:48 +00:00
|
|
|
!await DiffPage.helpDialog.isDisplayed(), 'help dialog should not be present'
|
2020-11-17 09:53:46 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
} );
|