Skip to content

Commit f51a772

Browse files
e2e - workbench history tests
1 parent 06acb6f commit f51a772

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

tests/e2e/tests/critical-path/workbench/command-results.e2e.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,27 @@ test.skip
115115
await workbenchPage.selectViewTypeText();
116116
await t.expect(await workbenchPage.queryCardContainer.nth(0).find(workbenchPage.cssQueryTextResult).visible).ok('The result is displayed in Text view');
117117
});
118+
test
119+
.after(async() => {
120+
//Drop database
121+
await deleteDatabase(ossStandaloneConfig.databaseName);
122+
})
123+
.meta({ rte: rte.standalone })
124+
('Verify that user can populate commands in Editor from history by clicking keyboard “up” button', async t => {
125+
const commands = [
126+
'FT.INFO',
127+
'RANDOMKEY',
128+
'set'
129+
];
130+
//Send commands
131+
for(const command of commands) {
132+
await workbenchPage.sendCommandInWorkbench(command);
133+
}
134+
//Verify the quick access to command history by up button
135+
for(const command of commands.reverse()) {
136+
await t.click(workbenchPage.queryInput);
137+
await t.pressKey('up');
138+
let script = await workbenchPage.scriptsLines.textContent;
139+
await t.expect(script.replace(/\s/g, ' ')).contains(command, 'Result of Manual command is displayed');
140+
}
141+
});

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,18 @@ test
5050
await t.click(shortcutsPage.shortcutsCloseButton);
5151
await t.expect(shortcutsPage.shortcutsPanel.exists).notOk('Shortcuts panel is not displayed');
5252
})
53+
test
54+
.meta({ rte: rte.none })
55+
('Verify that user can see description of the “up” shortcut in the Help Center > Keyboard Shortcuts > Workbench table', async t => {
56+
const description = [
57+
'Quick-access to command history',
58+
'Up Arrow'
59+
];
60+
//Open Shortcuts
61+
await t.click(myRedisDatabasePage.helpCenterButton);
62+
await t.click(helpCenterPage.helpCenterShortcutButton);
63+
// Verify that user can see description of the “up” shortcut
64+
for(const element of description) {
65+
await t.expect(shortcutsPage.shortcutsPanel.textContent).contains(element, 'The user can see description of the “up” shortcut');
66+
}
67+
})

0 commit comments

Comments
 (0)