Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions tests/e2e/tests/critical-path/browser/filtering.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,15 @@ test
await t.click(cliPage.cliExpandButton);
for (const { textType, keyName } of keyTypes) {
if (textType in COMMANDS_TO_CREATE_KEY) {
await t.typeText(cliPage.cliCommandInput, COMMANDS_TO_CREATE_KEY[textType](keyName));
await t.typeText(cliPage.cliCommandInput, COMMANDS_TO_CREATE_KEY[textType](keyName), { paste: true });
await t.pressKey('enter');
}
}
await t.click(cliPage.cliCollapseButton);

await t.click(browserPage.refreshKeysButton);
for (const { textType, keyName } of keyTypes) {
await browserPage.selectFilterGroupType(textType);
const isKeyIsDisplayedInTheList = await browserPage.isKeyIsDisplayedInTheList(keyName);
await t.expect(isKeyIsDisplayedInTheList).ok(`The key of type ${textType} was found`);
await t.expect(await browserPage.isKeyIsDisplayedInTheList(keyName)).ok(`The key of type ${textType} was found`);
await browserPage.deleteKey();
}
});
2 changes: 1 addition & 1 deletion tests/e2e/tests/critical-path/tree-view/tree-view.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test
.meta({ rte: rte.standalone })
('Verify that when user opens the application he can see that Tree View is disabled by default(Browser is selected by default)', async t => {
//Verify that Browser view is selected by default and Tree view is disabled
await t.expect(browserPage.browserViewButton.getStyleProperty('background-color')).eql('rgb(33, 37, 54)', 'The Browser is selected by default');
await t.expect(browserPage.browserViewButton.getStyleProperty('background-color')).eql('rgb(41, 47, 71)', 'The Browser is selected by default');
await t.expect(browserPage.treeViewArea.visible).notOk('The tree view is not displayed', { timeout: 20000 });
});
test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ test
await workbenchPage.sendCommandInWorkbench(command);
}
//Verify the quick access to command history by up button
await t.click(workbenchPage.queryInput);
for(const command of commands.reverse()) {
await t.click(workbenchPage.queryInput);
await t.pressKey('up');
let script = await workbenchPage.scriptsLines.textContent;
await t.expect(script.replace(/\s/g, ' ')).contains(command, 'Result of Manual command is displayed');
Expand Down
13 changes: 8 additions & 5 deletions tests/e2e/tests/regression/browser/ttl-format.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import { Selector } from 'testcafe';
import { acceptLicenseTermsAndAddDatabase, deleteDatabase } from '../../../helpers/database';
import { keyTypes, getRandomKeyName } from '../../../helpers/keys';
import { keyTypes } from '../../../helpers/keys';
import { rte } from '../../../helpers/constants';
import { COMMANDS_TO_CREATE_KEY, keyLength } from '../../../helpers/constants';
import { BrowserPage, CliPage } from '../../../pageObjects';
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
import { Chance } from 'chance';

const browserPage = new BrowserPage();
const cliPage = new CliPage();
const chance = new Chance();

const keysData = keyTypes.slice(0, 6);
for (const key of keysData) {
key.keyName = `${key.keyName}` + '-' + `${getRandomKeyName(keyLength)}`
key.keyName = `${key.keyName}` + '-' + `${chance.word({ length: keyLength })}`
}
//Arrays with TTL in seconds, min, hours, days, months, years and their values in Browser Page
const ttlForSet = [59, 800, 20000, 2000000, 31000000, 2147483647];
Expand All @@ -35,9 +38,9 @@ test
//Create new keys with TTL
await t.click(cliPage.cliExpandButton);
for (let i = 0; i < keysData.length; i++) {
await t.typeText(cliPage.cliCommandInput, COMMANDS_TO_CREATE_KEY[keysData[i].textType](keysData[i].keyName));
await t.typeText(cliPage.cliCommandInput, COMMANDS_TO_CREATE_KEY[keysData[i].textType](keysData[i].keyName), { paste: true });
await t.pressKey('enter');
await t.typeText(cliPage.cliCommandInput, `EXPIRE ${keysData[i].keyName} ${ttlForSet[i]}`);
await t.typeText(cliPage.cliCommandInput, `EXPIRE ${keysData[i].keyName} ${ttlForSet[i]}`, { paste: true });
await t.pressKey('enter');
}
await t.click(cliPage.cliCollapseButton);
Expand All @@ -46,6 +49,6 @@ test
//Check that Keys has correct TTL value in keys table
for (let i = 0; i < keysData.length; i++) {
const ttlValueElement = Selector(`[data-testid="ttl-${keysData[i].keyName}"]`);
await t.expect(ttlValueElement.textContent).contains(ttlValues[i], 'TTL value in keys table');
await t.expect(ttlValueElement.textContent).contains(ttlValues[i], `TTL value in keys table is ${ttlValues[i]}`);
}
});