diff --git a/tests/e2e/tests/regression/shortcuts/shortcuts.e2e.ts b/tests/e2e/tests/regression/shortcuts/shortcuts.e2e.ts index 37453247c6..d4ebf731c3 100644 --- a/tests/e2e/tests/regression/shortcuts/shortcuts.e2e.ts +++ b/tests/e2e/tests/regression/shortcuts/shortcuts.e2e.ts @@ -1,4 +1,4 @@ -import { rte } from '../../../helpers/constants'; +import { rte, env } from '../../../helpers/constants'; import { acceptLicenseTerms } from '../../../helpers/database'; import { MyRedisDatabasePage, HelpCenterPage, ShortcutsPage } from '../../../pageObjects'; import { commonUrl } from '../../../helpers/conf'; @@ -14,15 +14,31 @@ fixture `Shortcuts` await acceptLicenseTerms(); }) test - .meta({ rte: rte.none }) + .meta({ env: env.web, rte: rte.none }) ('Verify that user can see a summary of Shortcuts by clicking "Keyboard Shortcuts" button in Help Center', async t => { - // Click on help center icon + // Click on help center icon and verify panel await t.click(myRedisDatabasePage.helpCenterButton); - // Verify that Help Center panel is opened await t.expect(helpCenterPage.helpCenterPanel.exists).ok('Help Center panel is opened'); - // Click on Shortcuts option + // Click on Shortcuts option and verify panel + await t.click(helpCenterPage.helpCenterShortcutButton); + await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened'); + // Validate Title and sections of Shortcuts + await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened'); + await t.expect(shortcutsPage.shortcutsTitle.exists).ok('shortcutsTitle is opened'); + await t.expect(shortcutsPage.shortcutsCLISection.exists).ok('shortcutsCLISection is displayed'); + await t.expect(shortcutsPage.shortcutsWorkbenchSection.exists).ok('shortcutsWorkbenchSection is displayed'); + // Verify that user can close the Shortcuts + await t.click(shortcutsPage.shortcutsCloseButton); + await t.expect(shortcutsPage.shortcutsPanel.exists).notOk('Shortcuts panel is not displayed'); + }) +test + .meta({ env: env.desktop, rte: rte.none }) + ('Verify that user can see a summary of Shortcuts by clicking "Keyboard Shortcuts" button in Help Center for desktop', async t => { + // Click on help center icon and verify panel + await t.click(myRedisDatabasePage.helpCenterButton); + await t.expect(helpCenterPage.helpCenterPanel.exists).ok('Help Center panel is opened'); + // Click on Shortcuts option and verify panel await t.click(helpCenterPage.helpCenterShortcutButton); - // Validate that Shortcuts panel is opened await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened'); // Validate Title and sections of Shortcuts await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened'); @@ -32,6 +48,5 @@ test await t.expect(shortcutsPage.shortcutsWorkbenchSection.exists).ok('shortcutsWorkbenchSection is displayed'); // Verify that user can close the Shortcuts await t.click(shortcutsPage.shortcutsCloseButton); - // Verify that Shortcuts panel is not displayed await t.expect(shortcutsPage.shortcutsPanel.exists).notOk('Shortcuts panel is not displayed'); })