Skip to content

Commit cf67ad4

Browse files
Merge pull request #327 from RedisInsight/feature/e2e-tests-fix
e2e tests fix
2 parents afcf222 + 0a54ad8 commit cf67ad4

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

tests/e2e/tests/regression/shortcuts/shortcuts.e2e.ts

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { rte } from '../../../helpers/constants';
1+
import { rte, env } from '../../../helpers/constants';
22
import { acceptLicenseTerms } from '../../../helpers/database';
33
import { MyRedisDatabasePage, HelpCenterPage, ShortcutsPage } from '../../../pageObjects';
44
import { commonUrl } from '../../../helpers/conf';
@@ -14,15 +14,31 @@ fixture `Shortcuts`
1414
await acceptLicenseTerms();
1515
})
1616
test
17-
.meta({ rte: rte.none })
17+
.meta({ env: env.web, rte: rte.none })
1818
('Verify that user can see a summary of Shortcuts by clicking "Keyboard Shortcuts" button in Help Center', async t => {
19-
// Click on help center icon
19+
// Click on help center icon and verify panel
2020
await t.click(myRedisDatabasePage.helpCenterButton);
21-
// Verify that Help Center panel is opened
2221
await t.expect(helpCenterPage.helpCenterPanel.exists).ok('Help Center panel is opened');
23-
// Click on Shortcuts option
22+
// Click on Shortcuts option and verify panel
23+
await t.click(helpCenterPage.helpCenterShortcutButton);
24+
await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened');
25+
// Validate Title and sections of Shortcuts
26+
await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened');
27+
await t.expect(shortcutsPage.shortcutsTitle.exists).ok('shortcutsTitle is opened');
28+
await t.expect(shortcutsPage.shortcutsCLISection.exists).ok('shortcutsCLISection is displayed');
29+
await t.expect(shortcutsPage.shortcutsWorkbenchSection.exists).ok('shortcutsWorkbenchSection is displayed');
30+
// Verify that user can close the Shortcuts
31+
await t.click(shortcutsPage.shortcutsCloseButton);
32+
await t.expect(shortcutsPage.shortcutsPanel.exists).notOk('Shortcuts panel is not displayed');
33+
})
34+
test
35+
.meta({ env: env.desktop, rte: rte.none })
36+
('Verify that user can see a summary of Shortcuts by clicking "Keyboard Shortcuts" button in Help Center for desktop', async t => {
37+
// Click on help center icon and verify panel
38+
await t.click(myRedisDatabasePage.helpCenterButton);
39+
await t.expect(helpCenterPage.helpCenterPanel.exists).ok('Help Center panel is opened');
40+
// Click on Shortcuts option and verify panel
2441
await t.click(helpCenterPage.helpCenterShortcutButton);
25-
// Validate that Shortcuts panel is opened
2642
await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened');
2743
// Validate Title and sections of Shortcuts
2844
await t.expect(shortcutsPage.shortcutsPanel.exists).ok('Shortcuts panel is opened');
@@ -32,6 +48,5 @@ test
3248
await t.expect(shortcutsPage.shortcutsWorkbenchSection.exists).ok('shortcutsWorkbenchSection is displayed');
3349
// Verify that user can close the Shortcuts
3450
await t.click(shortcutsPage.shortcutsCloseButton);
35-
// Verify that Shortcuts panel is not displayed
3651
await t.expect(shortcutsPage.shortcutsPanel.exists).notOk('Shortcuts panel is not displayed');
3752
})

0 commit comments

Comments
 (0)