Skip to content

Commit 1bd3252

Browse files
committed
updates for failed tests
1 parent 72fdf1a commit 1bd3252

File tree

5 files changed

+26
-32
lines changed

5 files changed

+26
-32
lines changed

tests/e2e/tests/critical-path/workbench/command-results.e2e.ts

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Chance } from 'chance';
22
import { env, rte } from '../../../helpers/constants';
33
import { acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database';
44
import { MyRedisDatabasePage, WorkbenchPage } from '../../../pageObjects';
5-
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
5+
import { commonUrl, ossStandaloneRedisearch } from '../../../helpers/conf';
66
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
77

88
const myRedisDatabasePage = new MyRedisDatabasePage();
@@ -14,21 +14,20 @@ const commandForSend2 = 'FT._LIST';
1414
let indexName = chance.word({ length: 5 });
1515

1616
fixture `Command results at Workbench`
17-
.meta({type: 'critical_path'})
17+
.meta({ type: 'critical_path', rte: rte.standalone })
1818
.page(commonUrl)
1919
.beforeEach(async t => {
20-
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfig, ossStandaloneConfig.databaseName);
20+
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
2121
//Go to Workbench page
2222
await t.click(myRedisDatabasePage.workbenchButton);
2323
})
2424
.afterEach(async t => {
2525
//Drop index, documents and database
2626
await t.switchToMainWindow();
2727
await workbenchPage.sendCommandInWorkbench(`FT.DROPINDEX ${indexName} DD`);
28-
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
28+
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
2929
});
30-
test
31-
.meta({ rte: rte.standalone })('Verify that user can see re-run icon near the already executed command and re-execute the command by clicking on the icon in Workbench page', async t => {
30+
test('Verify that user can see re-run icon near the already executed command and re-execute the command by clicking on the icon in Workbench page', async t => {
3231
//Send commands
3332
await workbenchPage.sendCommandInWorkbench(commandForSend1);
3433
await workbenchPage.sendCommandInWorkbench(commandForSend2);
@@ -40,8 +39,7 @@ test
4039
//Verify that command is re-executed
4140
await t.expect(workbenchPage.queryCardCommand.textContent).eql(commandForSend1, 'The command is re-executed');
4241
});
43-
test
44-
.meta({ rte: rte.standalone })('Verify that user can see expanded result after command re-run at the top of results table in Workbench', async t => {
42+
test('Verify that user can see expanded result after command re-run at the top of results table in Workbench', async t => {
4543
//Send commands
4644
await workbenchPage.sendCommandInWorkbench(commandForSend1);
4745
await workbenchPage.sendCommandInWorkbench(commandForSend2);
@@ -53,8 +51,7 @@ test
5351
//Verify that re-executed command is at the top of results
5452
await t.expect(workbenchPage.queryCardCommand.nth(0).textContent).eql(commandForSend1, 'The re-executed command is at the top of results table');
5553
});
56-
test
57-
.meta({ rte: rte.standalone })('Verify that user can delete command with result from table with results in Workbench', async t => {
54+
test('Verify that user can delete command with result from table with results in Workbench', async t => {
5855
//Send command
5956
await workbenchPage.sendCommandInWorkbench(commandForSend1);
6057
//Delete the command from results
@@ -63,8 +60,7 @@ test
6360
//Verify that deleted command is not in results
6461
await t.expect(workbenchPage.queryCardCommand.withExactText(commandForSend1).exists).notOk(`Command ${commandForSend1} is deleted from table with results`);
6562
});
66-
test
67-
.meta({ rte: rte.standalone })('Verify that user can see the results found in the table view by default for FT.INFO, FT.SEARCH and FT.AGGREGATE', async t => {
63+
test('Verify that user can see the results found in the table view by default for FT.INFO, FT.SEARCH and FT.AGGREGATE', async t => {
6864
const commands = [
6965
'FT.INFO',
7066
'FT.SEARCH',
@@ -76,8 +72,7 @@ test
7672
await t.expect(await workbenchPage.queryCardContainer.nth(0).find(workbenchPage.cssTableViewTypeOption).visible).ok(`The table view is selected by default for command ${command}`);
7773
}
7874
});
79-
test
80-
.meta({ rte: rte.standalone })('Verify that user can switches between views and see results according to the view rules in Workbench in results', async t => {
75+
test('Verify that user can switches between views and see results according to the view rules in Workbench in results', async t => {
8176
indexName = chance.word({ length: 5 });
8277
const commands = [
8378
'hset doc:10 title "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud" url "redis.io" author "Test" rate "undefined" review "0" comment "Test comment"',
@@ -98,7 +93,7 @@ test
9893
});
9994
//skipped due the inaccessibility of the iframe
10095
test.skip
101-
.meta({ env: env.desktop, rte: rte.standalone })('Verify that user can switches between Table and Text for Client List and see results corresponding to their views', async t => {
96+
.meta({ env: env.desktop })('Verify that user can switches between Table and Text for Client List and see results corresponding to their views', async t => {
10297
const command = 'CLIENT LIST';
10398
//Send command and check table view is default
10499
await workbenchPage.sendCommandInWorkbench(command);
@@ -112,9 +107,8 @@ test.skip
112107
test
113108
.after(async() => {
114109
//Drop database
115-
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
116-
})
117-
.meta({ rte: rte.standalone })('Verify that user can populate commands in Editor from history by clicking keyboard “up” button', async t => {
110+
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
111+
})('Verify that user can populate commands in Editor from history by clicking keyboard “up” button', async t => {
118112
const commands = [
119113
'FT.INFO',
120114
'RANDOMKEY',

tests/e2e/tests/critical-path/workbench/default-scripts-area.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Chance } from 'chance';
22
import { acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database';
33
import { WorkbenchPage, MyRedisDatabasePage } from '../../../pageObjects';
44
import { rte, env } from '../../../helpers/constants';
5-
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
5+
import { commonUrl, ossStandaloneRedisearch } from '../../../helpers/conf';
66
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
77

88
const myRedisDatabasePage = new MyRedisDatabasePage();
@@ -16,15 +16,15 @@ fixture `Default scripts area at Workbench`
1616
.meta({type: 'critical_path'})
1717
.page(commonUrl)
1818
.beforeEach(async t => {
19-
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfig, ossStandaloneConfig.databaseName);
19+
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
2020
//Go to Workbench page
2121
await t.click(myRedisDatabasePage.workbenchButton);
2222
})
2323
.afterEach(async t => {
2424
//Drop index, documents and database
2525
await t.switchToMainWindow();
2626
await workbenchPage.sendCommandInWorkbench(`FT.DROPINDEX ${indexName} DD`);
27-
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
27+
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
2828
});
2929
test
3030
.meta({ env: env.desktop, rte: rte.standalone })('Verify that user can edit and run automatically added "FT._LIST" and "FT.INFO {index}" scripts in Workbench and see the results', async t => {

tests/e2e/tests/regression/workbench/command-results.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { WorkbenchPage } from '../../../pageObjects/workbench-page';
44
import { MyRedisDatabasePage } from '../../../pageObjects';
55
import {
66
commonUrl,
7-
ossStandaloneConfig
7+
ossStandaloneRedisearch
88
} from '../../../helpers/conf';
99
import { env, rte } from '../../../helpers/constants';
1010
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
@@ -24,7 +24,7 @@ fixture `Command results at Workbench`
2424
.meta({type: 'regression', rte: rte.standalone })
2525
.page(commonUrl)
2626
.beforeEach(async t => {
27-
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfig, ossStandaloneConfig.databaseName);
27+
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
2828
//Add index and data
2929
await t.click(myRedisDatabasePage.workbenchButton);
3030
await workbenchPage.sendCommandsArrayInWorkbench(commandsForIndex);
@@ -33,7 +33,7 @@ fixture `Command results at Workbench`
3333
//Drop index and database
3434
await t.switchToMainWindow();
3535
await workbenchPage.sendCommandInWorkbench(`FT.DROPINDEX ${indexName} DD`);
36-
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
36+
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
3737
});
3838
test
3939
.meta({ env: env.web })('Verify that user can switches between Table and Text for FT.INFO and see results corresponding to their views', async t => {

tests/e2e/tests/regression/workbench/default-scripts-area.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test
7777
await t.expect(workbenchPage.preselectHashCreate.visible).ok('The end of the page is visible');
7878
});
7979
//skipped due the issue RI-2384
80-
test
80+
test.skip
8181
.meta({ rte: rte.standalone })
8282
('Verify that user can see saved scroll position in Enablement area when he leaves Workbench page and goes back again', async t => {
8383
//Open Working with Hashes section

tests/e2e/tests/regression/workbench/raw-mode.e2e.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { acceptLicenseTerms, acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database';
22
import { WorkbenchPage, MyRedisDatabasePage, BrowserPage } from '../../../pageObjects';
33
import { rte } from '../../../helpers/constants';
4-
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
4+
import { commonUrl, ossStandaloneConfig, ossStandaloneRedisearch } from '../../../helpers/conf';
55
import { addNewStandaloneDatabasesApi, deleteStandaloneDatabaseApi, deleteStandaloneDatabasesApi } from '../../../helpers/api/api-database';
66
import { Common } from '../../../helpers/common';
77

@@ -39,7 +39,6 @@ fixture `Workbench Raw mode`
3939
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
4040
});
4141
test('Use raw mode for Workbech result', async t => {
42-
keyName = common.generateWord(10);
4342
// Send commands
4443
await workbenchPage.sendCommandsArrayInWorkbench(commandsForSend);
4544
// Display result in Ascii when raw mode is off
@@ -69,11 +68,8 @@ test
6968
})
7069
.after(async t => {
7170
// Clear and delete database
72-
await t.click(myRedisDatabasePage.browserButton);
73-
await browserPage.deleteKeyByName(keyName);
7471
await deleteStandaloneDatabasesApi(databasesForAdding);
7572
})('Save Raw mode state', async t => {
76-
keyName = common.generateWord(10);
7773
//Send command in raw mode
7874
await t.click(workbenchPage.rawModeBtn);
7975
await workbenchPage.sendCommandsArrayInWorkbench(commandsForSend);
@@ -94,13 +90,17 @@ test
9490
await workbenchPage.checkWorkbenchCommandResult(commandsForSend[1], `"${unicodeValue}"`);
9591
});
9692
test
93+
.before(async t => {
94+
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
95+
// Go to Workbench page
96+
await t.click(myRedisDatabasePage.workbenchButton);
97+
})
9798
.after(async t => {
9899
//Drop index, documents and database
99100
await t.switchToMainWindow();
100101
await workbenchPage.sendCommandInWorkbench(`FT.DROPINDEX ${indexName} DD`);
101-
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
102+
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
102103
})('Display Raw mode for plugins', async t => {
103-
keyName = common.generateWord(5);
104104
const commandsForSend = [
105105
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA name TEXT`,
106106
`HMSET product:1 name "${unicodeValue}"`,

0 commit comments

Comments
 (0)