Skip to content

Commit b339338

Browse files
e2e - add command history test
1 parent 09a30b0 commit b339338

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/e2e/tests/regression/workbench/history-of-results.e2e.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,22 @@ test
7676
}
7777
await t.expect(workbenchPage.noCommandHistoryTitle.visible).ok('The first command is deleted when user executes 31 command');
7878
});
79+
test
80+
.meta({ rte: rte.none })
81+
('Verify that user can see cursor is at the first character when Editor is empty', async t => {
82+
const commands = [
83+
'FT.INFO',
84+
'RANDOMKEY'
85+
];
86+
const commandForCheck = 'SET';
87+
//Send commands
88+
for(const command of commands) {
89+
await workbenchPage.sendCommandInWorkbench(command);
90+
}
91+
//Verify the quick access to history works when cursor is at the first character
92+
await t.typeText(workbenchPage.queryInput, commandForCheck);
93+
await t.pressKey('enter');
94+
await t.pressKey('up');
95+
let script = await workbenchPage.scriptsLines.textContent;
96+
await t.expect(script.replace(/\s/g, ' ')).contains(commandForCheck, 'The command is not changed');
97+
})

0 commit comments

Comments
 (0)