Skip to content

Commit e3c106c

Browse files
committed
deleted wait into deleteKeyByName and updated typeText with replace parameter
1 parent 4f0918f commit e3c106c

File tree

10 files changed

+164
-174
lines changed

10 files changed

+164
-174
lines changed

tests/e2e/pageObjects/browser-page.ts

Lines changed: 149 additions & 158 deletions
Large diffs are not rendered by default.

tests/e2e/pageObjects/cli-page.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class CliPage {
7575
await t.click(this.cliExpandButton);
7676
//Add keys
7777
const keyValueArray = await common.createArrayWithKeyValueAndKeyname(amount, keyName);
78-
await t.typeText(this.cliCommandInput, `${keyCommand} ${keyValueArray.join(' ')}`, { paste: true });
78+
await t.typeText(this.cliCommandInput, `${keyCommand} ${keyValueArray.join(' ')}`, { replace: true, paste: true });
7979
await t.pressKey('enter');
8080
await t.click(this.cliCollapseButton);
8181
}
@@ -87,7 +87,7 @@ export class CliPage {
8787
async sendCommandInCli(command: string): Promise<void> {
8888
//Open CLI
8989
await t.click(this.cliExpandButton);
90-
await t.typeText(this.cliCommandInput, command, { paste: true });
90+
await t.typeText(this.cliCommandInput, command, { replace: true, paste: true });
9191
await t.pressKey('enter');
9292
await t.click(this.cliCollapseButton);
9393
}
@@ -100,7 +100,7 @@ export class CliPage {
100100
//Open CLI
101101
await t.click(this.cliExpandButton);
102102
//Add keys
103-
await t.typeText(this.cliCommandInput, command, { paste: true });
103+
await t.typeText(this.cliCommandInput, command, { replace: true, paste: true });
104104
await t.pressKey('enter');
105105
const commandResult = await this.cliOutputResponseSuccess.innerText;
106106
await t.click(this.cliCollapseButton);

tests/e2e/pageObjects/my-redis-databases-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class MyRedisDatabasePage {
144144
* Get all databases from List of DBs page
145145
*/
146146
async getAllDatabases(): Promise<string[]> {
147-
const databases = [];
147+
const databases: string[] = [];
148148
const n = await this.dbNameList.count;
149149
for(let k = 0; k < n; k++) {
150150
const name = await this.dbNameList.nth(k).textContent;

tests/e2e/pageObjects/notification-page.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export class NotificationPage {
4747
async convertEpochDateToMessageDate(notification: NotificationParameters): Promise<string> {
4848
const epochTimeConversion = new Date(notification.timestamp * 1000).toDateString();
4949
const converted = epochTimeConversion.split(' ');
50-
console.log(`convertEpochDateToMessageDate: ${[converted[2], converted[1], converted[3]].join(' ')}`);
5150
return [converted[2], converted[1], converted[3]].join(' ');
5251
}
5352

tests/e2e/pageObjects/pub-sub-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export class PubSubPage {
3434
*/
3535
async publishMessage(channel: string, message: string): Promise<void> {
3636
await t.click(this.channelNameInput);
37-
await t.typeText(this.channelNameInput, channel, { replace: true });
37+
await t.typeText(this.channelNameInput, channel, { replace: true, paste: true });
3838
await t.click(this.messageInput);
39-
await t.typeText(this.messageInput, message, { replace: true });
39+
await t.typeText(this.messageInput, message, { replace: true, paste: true });
4040
await t.click(this.publishButton);
4141
}
4242

tests/e2e/pageObjects/settings-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class SettingsPage {
3232
async changeKeysToScanValue(value: string): Promise<void> {
3333
await t.hover(this.keysToScanValue);
3434
await t.click(this.keysToScanInput);
35-
await t.typeText(this.keysToScanInput, value, { replace: true });
35+
await t.typeText(this.keysToScanInput, value, { replace: true, paste: true });
3636
await t.click(this.applyButton);
3737
}
3838

@@ -43,7 +43,7 @@ export class SettingsPage {
4343
async changeCommandsInPipeline(value: string): Promise<void> {
4444
await t.hover(this.commandsInPipelineValue);
4545
await t.click(this.commandsInPipelineInput);
46-
await t.typeText(this.commandsInPipelineInput, value, { replace: true });
46+
await t.typeText(this.commandsInPipelineInput, value, { replace: true, paste: true });
4747
await t.click(this.applyButton);
4848
}
4949

tests/e2e/pageObjects/slow-log-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class SlowLogPage {
4242
*/
4343
async changeSlowerThanParameter(slowerThan: number, unit?: Selector): Promise<void> {
4444
await t.click(this.slowLogConfigureButton);
45-
await t.typeText(this.slowLogSlowerThanConfig, slowerThan.toString(), { replace: true });
45+
await t.typeText(this.slowLogSlowerThanConfig, slowerThan.toString(), { replace: true, paste: true });
4646
if (unit !== undefined) {
4747
await t.click(this.slowLogConfigureUnitButton);
4848
await t.click(unit);
@@ -56,7 +56,7 @@ export class SlowLogPage {
5656
*/
5757
async changeMaxLengthParameter(maxLength: number): Promise<void> {
5858
await t.click(this.slowLogConfigureButton);
59-
await t.typeText(this.slowLogMaxLengthConfig, maxLength.toString(), { replace: true });
59+
await t.typeText(this.slowLogMaxLengthConfig, maxLength.toString(), { replace: true, paste: true });
6060
await t.click(this.slowLogSaveConfigureButton);
6161
}
6262

tests/e2e/tests/critical-path/browser/consumer-group.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fixture `Consumer group`
3030
})
3131
.afterEach(async t => {
3232
// Clear and delete database
33-
if (await browserPage.closeKeyButton.visible) {
33+
if (await browserPage.closeKeyButton.visible, { timeout: 500 }) {
3434
await t.click(browserPage.closeKeyButton);
3535
}
3636
await browserPage.deleteKeyByName(keyName);
@@ -59,7 +59,7 @@ test('Verify that user can create a new Consumer Group in the current Stream', a
5959
await t.click(browserPage.addKeyValueItemsButton);
6060
await t.hover(browserPage.entryIdInfoIcon);
6161
for (const text of toolTip) {
62-
await t.expect(await browserPage.tooltip.innerText).contains(text, 'The toolTip message not displayed');
62+
await t.expect(browserPage.tooltip.innerText).contains(text, 'The toolTip message not displayed');
6363
}
6464
});
6565
test('Verify that user can input the 0, $ and Valid Entry ID in the ID field', async t => {

tests/e2e/tests/critical-path/database/modules.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ test
6565
// Connect to DB
6666
await myRedisDatabasePage.clickOnDBByName(ossStandaloneRedisearch.databaseName);
6767
// Check all available modules in overview
68-
const moduleIcons = await Selector('div').find('[data-testid^=Redi]');
68+
const moduleIcons = Selector('div').find('[data-testid^=Redi]');
6969
const numberOfIcons = await moduleIcons.count;
7070
for (let i = 0; i < numberOfIcons; i++) {
7171
const moduleName = await moduleIcons.nth(i).getAttribute('data-testid');

tests/e2e/tests/regression/workbench/scripting-area.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ test
9696
//Maximize Scripting area to see all the commands
9797
await t.drag(workbenchPage.resizeButtonForScriptingAndResults, 0, 300, { speed: 0.4 });
9898
//Get number of commands in scripting area
99-
const numberOfCommands = await Selector('span').withExactText('HSET').count;
99+
const numberOfCommands = Selector('span').withExactText('HSET').count;
100100
//Compare number of indicator displayed and expected value
101-
await t.expect(workbenchPage.monacoCommandIndicator.count).eql(numberOfCommands, 'Number of command indicator');
101+
await t.expect(workbenchPage.monacoCommandIndicator.count).eql(await numberOfCommands, 'Number of command indicator');
102102
});
103103
test
104104
.meta({ rte: rte.standalone })

0 commit comments

Comments
 (0)