Skip to content

Commit 652593c

Browse files
fix part of the test
1 parent ca3b0c9 commit 652593c

File tree

15 files changed

+125
-135
lines changed

15 files changed

+125
-135
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ workflows:
11631163
- e2e-tests:
11641164
name: E2ETest
11651165
build: docker
1166-
parallelism: 1
1166+
parallelism: 4
11671167
requires:
11681168
- Build docker image
11691169
- e2e-app-image:

tests/e2e/helpers/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { ClientFunction } from 'testcafe';
2+
import { commonUrl } from './conf';
3+
4+
export const goBackHistory = ClientFunction(() => window.history.back());
5+
export const openRedisHomePage = ClientFunction(() => window.open(commonUrl));

tests/e2e/tests/electron/critical-path/browser/bulk-upload.e2e.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ test('Verify bulk upload of different text docs formats', async t => {
6161

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

tests/e2e/tests/electron/critical-path/database/add-ssh-db.e2e.ts

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { DatabaseHelper } from '../../../../helpers/database';
55
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
66
import { sshPrivateKey, sshPrivateKeyWithPasscode } from '../../../../test-data/sshPrivateKeys';
77
import { Common } from '../../../../helpers/common';
8-
// import { BrowserActions } from '../../../common-actions/browser-actions';
8+
import { BrowserActions } from '../../../../common-actions/browser-actions';
99

1010
const myRedisDatabasePage = new MyRedisDatabasePage();
1111
const browserPage = new BrowserPage();
1212
const databaseHelper = new DatabaseHelper();
1313
const databaseAPIRequests = new DatabaseAPIRequests();
14-
// const browserActions = new BrowserActions();
14+
const browserActions = new BrowserActions();
1515

1616
const sshParams = {
1717
sshHost: '172.31.100.245',
@@ -43,6 +43,12 @@ fixture `Adding database with SSH`
4343
await databaseAPIRequests.deleteStandaloneDatabasesByNamesApi([sshDbPass.databaseName, sshDbPrivateKey.databaseName, sshDbPasscode.databaseName, newClonedDatabaseAlias]);
4444
});
4545
test('Adding database with SSH', async t => {
46+
const tooltipText = [
47+
'Enter a value for required fields (3):',
48+
'SSH Host',
49+
'SSH Username',
50+
'SSH Private Key'
51+
];
4652
const hiddenPass = '••••••••••••';
4753
const sshWithPass = {
4854
...sshParams,
@@ -57,25 +63,24 @@ test('Adding database with SSH', async t => {
5763
sshPrivateKey: sshPrivateKeyWithPasscode,
5864
sshPassphrase: 'test'
5965
};
60-
// update after resolving testcafe Native Automation mode limitations
61-
// // 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
62-
// await t
63-
// .click(myRedisDatabasePage.AddRedisDatabase.addDatabaseButton)
64-
// .click(myRedisDatabasePage.AddRedisDatabase.addDatabaseManually)
65-
// .click(myRedisDatabasePage.AddRedisDatabase.useSSHCheckbox)
66-
// .click(myRedisDatabasePage.AddRedisDatabase.sshPrivateKeyRadioBtn)
67-
// .hover(myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
68-
// for (const text of tooltipText) {
69-
// await browserActions.verifyTooltipContainsText(text, true);
70-
// }
71-
// // Verify that user can see the Test Connection button enabled/disabled with the same rules as the button to add/apply the changes
72-
// await t.hover(myRedisDatabasePage.AddRedisDatabase.testConnectionBtn);
73-
// for (const text of tooltipText) {
74-
// await browserActions.verifyTooltipContainsText(text, true);
75-
// }
66+
// 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
67+
await t
68+
.click(myRedisDatabasePage.AddRedisDatabase.addDatabaseButton)
69+
.click(myRedisDatabasePage.AddRedisDatabase.addDatabaseManually)
70+
.click(myRedisDatabasePage.AddRedisDatabase.useSSHCheckbox)
71+
.click(myRedisDatabasePage.AddRedisDatabase.sshPrivateKeyRadioBtn)
72+
.hover(myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
73+
for (const text of tooltipText) {
74+
await browserActions.verifyTooltipContainsText(text, true);
75+
}
76+
// Verify that user can see the Test Connection button enabled/disabled with the same rules as the button to add/apply the changes
77+
await t.hover(myRedisDatabasePage.AddRedisDatabase.testConnectionBtn);
78+
for (const text of tooltipText) {
79+
await browserActions.verifyTooltipContainsText(text, true);
80+
}
7681

7782
// Verify that user can add SSH tunnel with Password for Standalone database
78-
// await t.click(myRedisDatabasePage.AddRedisDatabase.cancelButton);
83+
await t.click(myRedisDatabasePage.AddRedisDatabase.cancelButton);
7984
await myRedisDatabasePage.AddRedisDatabase.addStandaloneSSHDatabase(sshDbPass, sshWithPass);
8085
await myRedisDatabasePage.clickOnDBByName(sshDbPass.databaseName);
8186
await Common.checkURLContainsText('browser');

tests/e2e/tests/web/critical-path/browser/bulk-upload.e2e.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ test('Verify bulk upload of different text docs formats', async t => {
6161

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

tests/e2e/tests/web/critical-path/cli/cli-command-helper.e2e.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ test('Verify that user can type TS. in Command helper and see commands from Redi
9090
await browserPage.CommandHelper.selectFilterGroupType(COMMAND_GROUP_TIMESERIES);
9191
// Search per part of command and check all opened commands
9292
await browserPage.CommandHelper.checkSearchedCommandInCommandHelper(commandForSearch, timeSeriesCommands);
93-
// update after resolving testcafe Native Automation mode limitations
94-
// // Check the first command documentation url
95-
// await browserPage.CommandHelper.checkURLCommand(timeSeriesCommands[0], `https://redis.io/commands/${timeSeriesCommands[0].toLowerCase()}/`);
96-
// await t.switchToParentWindow();
93+
// Check the first command documentation url
94+
await browserPage.CommandHelper.checkURLCommand(timeSeriesCommands[0], `https://redis.io/commands/${timeSeriesCommands[0].toLowerCase()}/`);
9795
});
9896
// outdated after https://redislabs.atlassian.net/browse/RI-4608
9997
test.skip('Verify that user can type GRAPH. in Command helper and see auto-suggestions from RedisGraph commands.json', async t => {

tests/e2e/tests/web/critical-path/database/connecting-to-the-db.e2e.ts

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { DatabaseHelper } from '../../../../helpers/database';
55
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
66
import { sshPrivateKey, sshPrivateKeyWithPasscode } from '../../../../test-data/sshPrivateKeys';
77
import { Common } from '../../../../helpers/common';
8-
// import { BrowserActions } from '../../../common-actions/browser-actions';
8+
import { BrowserActions } from '../../../../common-actions/browser-actions';
99

1010
const myRedisDatabasePage = new MyRedisDatabasePage();
1111
const browserPage = new BrowserPage();
1212
const databaseHelper = new DatabaseHelper();
1313
const databaseAPIRequests = new DatabaseAPIRequests();
1414
const welcomePage = new WelcomePage();
15-
// const browserActions = new BrowserActions();
15+
const browserActions = new BrowserActions();
1616

1717
const sshParams = {
1818
sshHost: '172.31.100.245',
@@ -90,12 +90,12 @@ test
9090
await databaseAPIRequests.deleteStandaloneDatabasesByNamesApi([sshDbPass.databaseName, sshDbPrivateKey.databaseName, sshDbPasscode.databaseName, newClonedDatabaseAlias]);
9191
})('Adding database with SSH', async t => {
9292
const hiddenPass = '••••••••••••';
93-
// const tooltipText = [
94-
// 'Enter a value for required fields (3):',
95-
// 'SSH Host',
96-
// 'SSH Username',
97-
// 'SSH Private Key'
98-
// ];
93+
const tooltipText = [
94+
'Enter a value for required fields (3):',
95+
'SSH Host',
96+
'SSH Username',
97+
'SSH Private Key'
98+
];
9999
const sshWithPass = {
100100
...sshParams,
101101
sshPassword: 'pass'
@@ -109,25 +109,24 @@ test
109109
sshPrivateKey: sshPrivateKeyWithPasscode,
110110
sshPassphrase: 'test'
111111
};
112-
// update after resolving testcafe Native Automation mode limitations
113-
// // 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
114-
// await t
115-
// .click(myRedisDatabasePage.AddRedisDatabase.addDatabaseButton)
116-
// .click(myRedisDatabasePage.AddRedisDatabase.addDatabaseManually)
117-
// .click(myRedisDatabasePage.AddRedisDatabase.useSSHCheckbox)
118-
// .click(myRedisDatabasePage.AddRedisDatabase.sshPrivateKeyRadioBtn)
119-
// .hover(myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
120-
// for (const text of tooltipText) {
121-
// await browserActions.verifyTooltipContainsText(text, true);
122-
// }
123-
// // Verify that user can see the Test Connection button enabled/disabled with the same rules as the button to add/apply the changes
124-
// await t.hover(myRedisDatabasePage.AddRedisDatabase.testConnectionBtn);
125-
// for (const text of tooltipText) {
126-
// await browserActions.verifyTooltipContainsText(text, true);
127-
// }
112+
// 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
113+
await t
114+
.click(myRedisDatabasePage.AddRedisDatabase.addDatabaseButton)
115+
.click(myRedisDatabasePage.AddRedisDatabase.addDatabaseManually)
116+
.click(myRedisDatabasePage.AddRedisDatabase.useSSHCheckbox)
117+
.click(myRedisDatabasePage.AddRedisDatabase.sshPrivateKeyRadioBtn)
118+
.hover(myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
119+
for (const text of tooltipText) {
120+
await browserActions.verifyTooltipContainsText(text, true);
121+
}
122+
// Verify that user can see the Test Connection button enabled/disabled with the same rules as the button to add/apply the changes
123+
await t.hover(myRedisDatabasePage.AddRedisDatabase.testConnectionBtn);
124+
for (const text of tooltipText) {
125+
await browserActions.verifyTooltipContainsText(text, true);
126+
}
128127

129128
// Verify that user can add SSH tunnel with Password for Standalone database
130-
// await t.click(myRedisDatabasePage.AddRedisDatabase.cancelButton);
129+
await t.click(myRedisDatabasePage.AddRedisDatabase.cancelButton);
131130
await myRedisDatabasePage.AddRedisDatabase.addStandaloneSSHDatabase(sshDbPass, sshWithPass);
132131
await myRedisDatabasePage.clickOnDBByName(sshDbPass.databaseName);
133132
await Common.checkURLContainsText('browser');

tests/e2e/tests/web/critical-path/monitor/save-commands.e2e.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,19 @@ fixture `Save commands`
3030
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneConfig);
3131
});
3232
test('Verify that user can see a tooltip and toggle that allows to save Profiler log or not in the Profiler', async t => {
33-
// const toolTip = [
34-
// 'Allows you to download the generated log file after pausing the Profiler',
35-
// '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.'
36-
// ];
33+
const toolTip = [
34+
'Allows you to download the generated log file after pausing the Profiler',
35+
'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.'
36+
];
3737

3838
await t.click(browserPage.Profiler.expandMonitor);
3939
// Check the toggle and Tooltip for Save log
4040
await t.expect(browserPage.Profiler.saveLogSwitchButton.exists).ok('The toggle that allows to save Profiler log is not displayed');
41-
// update after resolving testcafe Native Automation mode limitations
42-
// await t.hover(browserPage.Profiler.saveLogSwitchButton);
43-
// for (const message of toolTip) {
44-
// await t.click(browserPage.Profiler.saveLogSwitchButton);
45-
// await t.expect(browserPage.Profiler.saveLogToolTip.textContent).contains(message, 'The toolTip for save log in Profiler is not displayed');
46-
// }
41+
await t.hover(browserPage.Profiler.saveLogSwitchButton);
42+
for (const message of toolTip) {
43+
await t.click(browserPage.Profiler.saveLogSwitchButton);
44+
await t.expect(browserPage.Profiler.saveLogToolTip.textContent).contains(message, 'The toolTip for save log in Profiler is not displayed');
45+
}
4746
// Check toggle state
4847
await t.expect(browserPage.Profiler.saveLogSwitchButton.getAttribute('aria-checked')).eql('false', 'The toggle state is not OFF when Profiler opened');
4948
});

tests/e2e/tests/web/regression/browser/survey-link.e2e.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ import { DatabaseHelper } from '../../../../helpers/database';
22
import { rte } from '../../../../helpers/constants';
33
import { BrowserPage, MyRedisDatabasePage } from '../../../../pageObjects';
44
import { commonUrl, ossStandaloneConfig } from '../../../../helpers/conf';
5-
// import { Common } from '../../../helpers/common';
65
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
6+
import { Common } from '../../../../helpers/common';
7+
import { goBackHistory } from '../../../../helpers/utils';
78

89
const browserPage = new BrowserPage();
910
const myRedisDatabasePage = new MyRedisDatabasePage();
1011
const databaseHelper = new DatabaseHelper();
1112
const databaseAPIRequests = new DatabaseAPIRequests();
1213

13-
// const externalPageLink = 'https://www.surveymonkey.com/r/redisinsight';
14+
const externalPageLink = 'https://www.surveymonkey.com/r/redisinsight';
1415

1516
fixture `User Survey`
1617
.meta({
@@ -25,10 +26,10 @@ test('Verify that user can use survey link', async t => {
2526
// Verify that user can see survey link on any page inside of DB
2627
// Browser page
2728
await t.expect(browserPage.userSurveyLink.visible).ok('Survey Link is not displayed');
28-
// update after resolving testcafe Native Automation mode limitations
29-
// await t.click(browserPage.userSurveyLink);
30-
// // Verify that when users click on RI survey, they are redirected to https://www.surveymonkey.com/r/redisinsight
31-
// await Common.checkURL(externalPageLink);
29+
await t.click(browserPage.userSurveyLink);
30+
// Verify that when users click on RI survey, they are redirected to https://www.surveymonkey.com/r/redisinsight
31+
await Common.checkURL(externalPageLink);
32+
await goBackHistory();
3233
// await t.switchToParentWindow();
3334
// Workbench page
3435
await t.click(myRedisDatabasePage.NavigationPanel.workbenchButton);

0 commit comments

Comments
 (0)