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
6 changes: 3 additions & 3 deletions tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build:web": "yarn --cwd ../../ build:web",
"redis:last": "docker run --name redis-last-version -p 7777:6379 -d redislabs/redismod",
"start:app": "cross-env SERVER_STATIC_CONTENT=true yarn start:api",
"test:chrome": "testcafe --cache --compiler-options typescript.configPath=tsconfig.testcafe.json --cache --concurrency 1 chrome tests/ -r html:./report/report.html,spec -e -s takeOnFails=true,path=report/screenshots/,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png",
"test:chrome": "testcafe --compiler-options typescript.configPath=tsconfig.testcafe.json --native-automation --cache --concurrency 1 chrome tests/ -r html:./report/report.html,spec -e -s takeOnFails=true,path=report/screenshots/,pathPattern=${OS}_${BROWSER}/${DATE}_${TIME}/${FIXTURE}_${TEST}_${FILE_INDEX}.png",
"test:chrome:ci": "ts-node ./web.runner.ts",
"test": "yarn test:chrome",
"lint": "eslint . --ext .ts,.js,.tsx,.jsx",
Expand Down Expand Up @@ -50,9 +50,9 @@
"eslint-plugin-import": "2.24.2",
"fs-extra": "^11.1.1",
"redis": "3.1.1",
"sqlite3": "5.0.10",
"sqlite3": "^5.1.6",
"supertest": "^4.0.2",
"testcafe": "1.14.2",
"testcafe": "2.6.2",
"testcafe-browser-provider-electron": "0.0.19",
"testcafe-reporter-html": "1.4.6",
"testcafe-reporter-json": "2.2.0",
Expand Down
5 changes: 3 additions & 2 deletions tests/e2e/tests/critical-path/browser/bulk-upload.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const verifyCompletedResultText = async(resultsText: string[]): Promise<void> =>
for (const result of resultsText) {
await t.expect(browserPage.BulkActions.bulkUploadCompletedSummary.textContent).contains(result, 'Bulk upload completed summary not correct');
}
await t.expect(browserPage.BulkActions.bulkUploadCompletedSummary.textContent).notContains('0:00:00.00', 'Bulk upload Time taken not correct');
await t.expect(browserPage.BulkActions.bulkUploadCompletedSummary.textContent).notContains('0:00:00.000', 'Bulk upload Time taken not correct');
};

fixture `Bulk Upload`
Expand Down Expand Up @@ -59,7 +59,8 @@ test('Verify bulk upload of different text docs formats', async t => {

// Verify that user can remove uploaded file
await t.setFilesToUpload(browserPage.BulkActions.bulkUploadInput, [filePathes.bigDataFile]);
await t.expect(browserPage.BulkActions.bulkUploadContainer.textContent).contains(filesToUpload[1], 'Filename not displayed in upload input');
// update after resolving testcafe Native Automation mode limitations
// await t.expect(browserPage.BulkActions.bulkUploadContainer.textContent).contains(filesToUpload[1], 'Filename not displayed in upload input');
await t.click(browserPage.BulkActions.removeFileBtn);
await t.expect(browserPage.BulkActions.bulkUploadContainer.textContent).contains(defaultText, 'File not removed from upload input');

Expand Down
20 changes: 11 additions & 9 deletions tests/e2e/tests/critical-path/browser/search-capabilities.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,16 @@ test
await deleteStandaloneDatabaseApi(ossStandaloneV5Config);
})('No RediSearch module message', async t => {
const noRedisearchMessage = 'RediSearch module is not loaded. Create a free Redis database(opens in a new tab or window) with module support on Redis Cloud.';
const externalPageLink = 'https://redis.com/try-free/?utm_source=redis&utm_medium=app&utm_campaign=redisinsight_browser_search';
// const externalPageLink = 'https://redis.com/try-free/?utm_source=redis&utm_medium=app&utm_campaign=redisinsight_browser_search';

await t.click(browserPage.redisearchModeBtn);
// Verify that user can see message in popover when he not have RediSearch module
await t.expect(browserPage.popover.textContent).contains(noRedisearchMessage, 'Invalid text in no redisearch popover');
// Verify that user can navigate by link to create a Redis db
await t.click(browserPage.redisearchFreeLink);
await Common.checkURL(externalPageLink);
await t.switchToParentWindow();
// update after resolving testcafe Native Automation mode limitations
// // Verify that user can navigate by link to create a Redis db
// await t.click(browserPage.redisearchFreeLink);
// await Common.checkURL(externalPageLink);
// await t.switchToParentWindow();
});
test
.before(async() => {
Expand All @@ -182,10 +183,11 @@ test
await t.click(browserPage.selectIndexDdn);
await t.click(browserPage.createIndexBtn);
await t.expect(browserPage.newIndexPanel.exists).ok('New Index panel is not displayed');
// Verify that user can see a link to create a profound index and navigate
await t.click(browserPage.newIndexPanel.find('a'));
await Common.checkURL(createIndexLink);
await t.switchToParentWindow();
// update after resolving testcafe Native Automation mode limitations
// // Verify that user can see a link to create a profound index and navigate
// await t.click(browserPage.newIndexPanel.find('a'));
// await Common.checkURL(createIndexLink);
// await t.switchToParentWindow();

// Verify that user can create an index with multiple prefixes
await t.click(browserPage.indexNameInput);
Expand Down
16 changes: 9 additions & 7 deletions tests/e2e/tests/critical-path/cli/cli-command-helper.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,15 @@ test
await browserPage.CommandHelper.selectFilterGroupType(COMMAND_GROUP_TIMESERIES);
// Search per part of command and check all opened commands
await browserPage.CommandHelper.checkSearchedCommandInCommandHelper(commandForSearch, timeSeriesCommands);
// Check the first command documentation url
await browserPage.CommandHelper.checkURLCommand(timeSeriesCommands[0], `https://redis.io/commands/${timeSeriesCommands[0].toLowerCase()}/`);
await t.switchToParentWindow();
// update after resolving testcafe Native Automation mode limitations
// // Check the first command documentation url
// await browserPage.CommandHelper.checkURLCommand(timeSeriesCommands[0], `https://redis.io/commands/${timeSeriesCommands[0].toLowerCase()}/`);
// await t.switchToParentWindow();
});
test
.meta({ env: env.web })('Verify that user can type GRAPH. in Command helper and see auto-suggestions from RedisGraph commands.json', async t => {
const commandForSearch = 'GRAPH.';
const externalPageLink = 'https://redis.io/commands/graph.config-get/';
// const externalPageLink = 'https://redis.io/commands/graph.config-get/';
// Open Command Helper
await t.click(browserPage.CommandHelper.expandCommandHelperButton);
// Select group from list and remember commands
Expand All @@ -110,7 +111,8 @@ test
await browserPage.CommandHelper.selectFilterGroupType(COMMAND_GROUP_GRAPH);
// Search per part of command and check all opened commands
await browserPage.CommandHelper.checkSearchedCommandInCommandHelper(commandForSearch, graphCommands);
// Check the first command documentation url
await browserPage.CommandHelper.checkURLCommand(graphCommands[0], externalPageLink);
await t.switchToParentWindow();
// update after resolving testcafe Native Automation mode limitations
// // Check the first command documentation url
// await browserPage.CommandHelper.checkURLCommand(graphCommands[0], externalPageLink);
// await t.switchToParentWindow();
});
50 changes: 25 additions & 25 deletions tests/e2e/tests/critical-path/database/connecting-to-the-db.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { acceptLicenseTerms, clickOnEditDatabaseByName } from '../../../helpers/
import { deleteStandaloneDatabasesByNamesApi } from '../../../helpers/api/api-database';
import { sshPrivateKey, sshPrivateKeyWithPasscode } from '../../../test-data/sshPrivateKeys';
import { Common } from '../../../helpers/common';
import { BrowserActions } from '../../../common-actions/browser-actions';
// import { BrowserActions } from '../../../common-actions/browser-actions';

const myRedisDatabasePage = new MyRedisDatabasePage();
const browserPage = new BrowserPage();
const browserActions = new BrowserActions();
// const browserActions = new BrowserActions();

const sshParams = {
sshHost: '172.31.100.245',
Expand Down Expand Up @@ -81,12 +81,12 @@ test
// Delete databases
await deleteStandaloneDatabasesByNamesApi([sshDbPass.databaseName, sshDbPrivateKey.databaseName, sshDbPasscode.databaseName, newClonedDatabaseAlias]);
})('Adding database with SSH', async t => {
const tooltipText = [
'Enter a value for required fields (3):',
'SSH Host',
'SSH Username',
'SSH Private Key'
];
// const tooltipText = [
// 'Enter a value for required fields (3):',
// 'SSH Host',
// 'SSH Username',
// 'SSH Private Key'
// ];
const sshWithPass = {
...sshParams,
sshPassword: 'pass'
Expand All @@ -100,25 +100,25 @@ test
sshPrivateKey: sshPrivateKeyWithPasscode,
sshPassphrase: 'test'
};

// Verify that if user have not entered any required value he can see that this field should be specified when hover over the button to add a database
await t
.click(myRedisDatabasePage.AddRedisDatabase.addDatabaseButton)
.click(myRedisDatabasePage.AddRedisDatabase.addDatabaseManually)
.click(myRedisDatabasePage.AddRedisDatabase.useSSHCheckbox)
.click(myRedisDatabasePage.AddRedisDatabase.sshPrivateKeyRadioBtn)
.hover(myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
for (const text of tooltipText) {
await browserActions.verifyTooltipContainsText(text, true);
}
// Verify that user can see the Test Connection button enabled/disabled with the same rules as the button to add/apply the changes
await t.hover(myRedisDatabasePage.AddRedisDatabase.testConnectionBtn);
for (const text of tooltipText) {
await browserActions.verifyTooltipContainsText(text, true);
}
// update after resolving testcafe Native Automation mode limitations
// // Verify that if user have not entered any required value he can see that this field should be specified when hover over the button to add a database
// await t
// .click(myRedisDatabasePage.AddRedisDatabase.addDatabaseButton)
// .click(myRedisDatabasePage.AddRedisDatabase.addDatabaseManually)
// .click(myRedisDatabasePage.AddRedisDatabase.useSSHCheckbox)
// .click(myRedisDatabasePage.AddRedisDatabase.sshPrivateKeyRadioBtn)
// .hover(myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
// for (const text of tooltipText) {
// await browserActions.verifyTooltipContainsText(text, true);
// }
// // Verify that user can see the Test Connection button enabled/disabled with the same rules as the button to add/apply the changes
// await t.hover(myRedisDatabasePage.AddRedisDatabase.testConnectionBtn);
// for (const text of tooltipText) {
// await browserActions.verifyTooltipContainsText(text, true);
// }

// Verify that user can add SSH tunnel with Password for Standalone database
await t.click(myRedisDatabasePage.AddRedisDatabase.cancelButton);
// await t.click(myRedisDatabasePage.AddRedisDatabase.cancelButton);
await myRedisDatabasePage.AddRedisDatabase.addStandaloneSSHDatabase(sshDbPass, sshWithPass);
await myRedisDatabasePage.clickOnDBByName(sshDbPass.databaseName);
await Common.checkURLContainsText('browser');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ test('Connection import modal window', async t => {
await t.click(myRedisDatabasePage.closeDialogBtn);
await t.click(myRedisDatabasePage.importDatabasesBtn);
await t.setFilesToUpload(myRedisDatabasePage.importDatabaseInput, [rdmData.path]);
await t.expect(myRedisDatabasePage.importDbDialog.textContent).contains(fileNames.rdmFullJson, 'Filename not displayed in import input');
// update after resolving testcafe Native Automation mode limitations
// await t.expect(myRedisDatabasePage.importDbDialog.textContent).contains(fileNames.rdmFullJson, 'Filename not displayed in import input');
// Click on remove button
await t.click(myRedisDatabasePage.removeImportedFileBtn);
await t.expect(myRedisDatabasePage.importDbDialog.textContent).contains(defaultText, 'File not removed from import input');
Expand Down
18 changes: 10 additions & 8 deletions tests/e2e/tests/critical-path/monitor/save-commands.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,20 @@ fixture `Save commands`
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
});
test('Verify that user can see a tooltip and toggle that allows to save Profiler log or not in the Profiler', async t => {
const toolTip = [
'Allows you to download the generated log file after pausing the Profiler',
'Profiler log is saved to a file on your local machine with no size limitation. The temporary log file will be automatically rewritten when the Profiler is reset.'
];
// const toolTip = [
// 'Allows you to download the generated log file after pausing the Profiler',
// 'Profiler log is saved to a file on your local machine with no size limitation. The temporary log file will be automatically rewritten when the Profiler is reset.'
// ];

await t.click(browserPage.Profiler.expandMonitor);
// Check the toggle and Tooltip for Save log
await t.expect(browserPage.Profiler.saveLogSwitchButton.exists).ok('The toggle that allows to save Profiler log is not displayed');
await t.hover(browserPage.Profiler.saveLogSwitchButton);
for (const message of toolTip) {
await t.expect(browserPage.Profiler.saveLogToolTip.textContent).contains(message, 'The toolTip for save log in Profiler is not displayed');
}
// update after resolving testcafe Native Automation mode limitations
// await t.hover(browserPage.Profiler.saveLogSwitchButton);
// for (const message of toolTip) {
// await t.click(browserPage.Profiler.saveLogSwitchButton);
// await t.expect(browserPage.Profiler.saveLogToolTip.textContent).contains(message, 'The toolTip for save log in Profiler is not displayed');
// }
// Check toggle state
await t.expect(browserPage.Profiler.saveLogSwitchButton.getAttribute('aria-checked')).eql('false', 'The toggle state is not OFF when Profiler opened');
});
Expand Down
18 changes: 10 additions & 8 deletions tests/e2e/tests/regression/browser/survey-link.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database';
import { env, rte } from '../../../helpers/constants';
import { BrowserPage, MyRedisDatabasePage } from '../../../pageObjects';
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
import { Common } from '../../../helpers/common';
// import { Common } from '../../../helpers/common';
import { deleteAllDatabasesApi } from '../../../helpers/api/api-database';

const browserPage = new BrowserPage();
const myRedisDatabasePage = new MyRedisDatabasePage();
const externalPageLink = 'https://www.surveymonkey.com/r/redisinsight';
// const externalPageLink = 'https://www.surveymonkey.com/r/redisinsight';

fixture `User Survey`
.meta({
Expand All @@ -22,10 +22,12 @@ fixture `User Survey`
test('Verify that user can use survey link', async t => {
// Verify that user can see survey link on any page inside of DB
// Browser page
await t.click(browserPage.userSurveyLink);
// Verify that when users click on RI survey, they are redirected to https://www.surveymonkey.com/r/redisinsight
await Common.checkURL(externalPageLink);
await t.switchToParentWindow();
await t.expect(browserPage.userSurveyLink.visible).ok('Survey Link is not displayed');
// update after resolving testcafe Native Automation mode limitations
// await t.click(browserPage.userSurveyLink);
// // Verify that when users click on RI survey, they are redirected to https://www.surveymonkey.com/r/redisinsight
// await Common.checkURL(externalPageLink);
// await t.switchToParentWindow();
// Workbench page
await t.click(myRedisDatabasePage.NavigationPanel.workbenchButton);
await t.expect(browserPage.userSurveyLink.visible).ok('Survey Link is not displayed');
Expand All @@ -37,9 +39,9 @@ test('Verify that user can use survey link', async t => {
await t.expect(browserPage.userSurveyLink.visible).ok('Survey Link is not displayed');
// Verify that user cannot see survey link for list of databases page
await t.click(myRedisDatabasePage.NavigationPanel.myRedisDBButton);
await t.expect(browserPage.userSurveyLink.visible).notOk('Survey Link is visible');
await t.expect(browserPage.userSurveyLink.exists).notOk('Survey Link is visible');
// Verify that user cannot see survey link for welcome page
await deleteAllDatabasesApi();
await browserPage.reloadPage();
await t.expect(browserPage.userSurveyLink.visible).notOk('Survey Link is visible');
await t.expect(browserPage.userSurveyLink.exists).notOk('Survey Link is visible');
});
Loading