|
| 1 | +import { |
| 2 | + UserAgreementPage, |
| 3 | + MyRedisDatabasePage, |
| 4 | + HelpCenterPage, |
| 5 | + ShortcutsPage |
| 6 | +} from '../../../pageObjects'; |
| 7 | +import { |
| 8 | + commonUrl |
| 9 | +} from '../../../helpers/conf'; |
| 10 | + |
| 11 | +const userAgreementPage = new UserAgreementPage(); |
| 12 | +const myRedisDatabasePage = new MyRedisDatabasePage(); |
| 13 | +const helpCenterPage = new HelpCenterPage(); |
| 14 | +const shortcutsPage = new ShortcutsPage(); |
| 15 | + |
| 16 | +fixture `Shortcuts` |
| 17 | + .meta({ type: 'regression' }) |
| 18 | + .page(commonUrl) |
| 19 | + .beforeEach(async t => { |
| 20 | + await t.maximizeWindow(); |
| 21 | + await userAgreementPage.acceptLicenseTerms(); |
| 22 | + }) |
| 23 | + |
| 24 | +test('Verify that user can see a summary of Shortcuts by clicking "Keyboard Shortcuts" button in Help Center', async t => { |
| 25 | + // Click on help center icon |
| 26 | + await t.click(myRedisDatabasePage.helpCenterButton); |
| 27 | + // Verify that Help Center panel is opened |
| 28 | + await t.expect(helpCenterPage.helpCenterPanel.exists).ok('Help Center panel is opened'); |
| 29 | + // Click on Shortcuts option |
| 30 | + await t.click(helpCenterPage.helpCenterShortcutButton); |
| 31 | + // Validate that Shortcuts panel is opened |
| 32 | + await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened'); |
| 33 | + // Validate Title and sections of Shortcuts |
| 34 | + await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened'); |
| 35 | + await t.expect(shortcutsPage.shortcutsTitle.exists).ok('shortcutsTitle is opened'); |
| 36 | + await t.expect(shortcutsPage.shortcutsDesktopApplicationSection.exists).ok('shortcutsDesktopApplicationSection is opened'); |
| 37 | + await t.expect(shortcutsPage.shortcutsCLISection.exists).ok('shortcutsCLISection is displayed'); |
| 38 | + await t.expect(shortcutsPage.shortcutsWorkbenchSection.exists).ok('shortcutsWorkbenchSection is displayed'); |
| 39 | + // Verify that user can close the Shortcuts |
| 40 | + await t.click(shortcutsPage.shortcutsCloseButton); |
| 41 | + // Verify that Shortcuts panel is not displayed |
| 42 | + await t.expect(shortcutsPage.shortcutsPanel.exists).notOk('Shortcuts panel is not displayed'); |
| 43 | +}) |
0 commit comments