Skip to content

Commit cf02b01

Browse files
committed
remove .only
1 parent ab55da4 commit cf02b01

File tree

7 files changed

+179
-191
lines changed

7 files changed

+179
-191
lines changed

.circleci/config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,7 @@ jobs:
383383
description: Number of threads to run tests
384384
type: integer
385385
default: 1
386-
# parallelism: << parameters.parallelism >>
387-
parallelism: 1
386+
parallelism: << parameters.parallelism >>
388387
steps:
389388
- checkout
390389
- when:

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

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { env, rte } from '../../../helpers/constants';
1+
import { rte } from '../../../helpers/constants';
22
import { acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database';
33
import { MyRedisDatabasePage, WorkbenchPage } from '../../../pageObjects';
44
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
@@ -49,7 +49,7 @@ test('Verify that user can see re-run icon near the already executed command and
4949
// Verify that user can delete command with result from table with results in Workbench
5050
await t.expect(workbenchPage.queryCardCommand.withExactText(commandForSend2).exists).notOk(`Command ${commandForSend2} is not deleted from table with results`);
5151
});
52-
test.only('Verify that user can see the results found in the table view by default for FT.INFO, FT.SEARCH and FT.AGGREGATE', async t => {
52+
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 => {
5353
const commands = [
5454
'FT.INFO',
5555
'FT.SEARCH',
@@ -61,28 +61,26 @@ test.only('Verify that user can see the results found in the table view by defau
6161
await t.expect(await workbenchPage.queryCardContainer.nth(0).find(workbenchPage.cssTableViewTypeOption).visible).ok(`The table view is not selected by default for command ${command}`);
6262
}
6363
});
64-
test
65-
.meta({ env: env.desktop })('Verify that user can switches between views and see results according to the view rules in Workbench in results', async t => {
66-
indexName = common.generateWord(5);
67-
const commands = [
68-
'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"',
69-
`FT.CREATE ${indexName} ON HASH PREFIX 1 doc: SCHEMA title TEXT WEIGHT 5.0 body TEXT url TEXT author TEXT rate TEXT review TEXT comment TEXT`,
70-
`FT.SEARCH ${indexName} * limit 0 10000`
71-
];
64+
test('Verify that user can switches between views and see results according to the view rules in Workbench in results', async t => {
65+
indexName = common.generateWord(5);
66+
const commands = [
67+
'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"',
68+
`FT.CREATE ${indexName} ON HASH PREFIX 1 doc: SCHEMA title TEXT WEIGHT 5.0 body TEXT url TEXT author TEXT rate TEXT review TEXT comment TEXT`,
69+
`FT.SEARCH ${indexName} * limit 0 10000`
70+
];
7271
// Send commands and check table view is default for Search command
73-
for (const command of commands) {
74-
await workbenchPage.sendCommandInWorkbench(command);
75-
}
76-
await t.expect(await workbenchPage.queryCardContainer.nth(0).find(workbenchPage.cssTableViewTypeOption).visible).ok('The table view is not selected by default for command FT.SEARCH');
77-
await t.switchToIframe(workbenchPage.iframe);
78-
await t.expect(await workbenchPage.queryTableResult.visible).ok('The table result is not displayed for command FT.SEARCH');
79-
// Select Text view and check result
80-
await t.switchToMainWindow();
81-
await workbenchPage.selectViewTypeText();
82-
await t.expect(await workbenchPage.queryCardContainer.nth(0).find(workbenchPage.cssQueryTextResult).visible).ok('The result is not displayed in Text view');
83-
});
84-
// Skipped due to issue https://redislabs.atlassian.net/browse/RI-3524
85-
test.skip('Verify that user can switches between Table and Text for Client List and see results corresponding to their views', async t => {
72+
for (const command of commands) {
73+
await workbenchPage.sendCommandInWorkbench(command);
74+
}
75+
await t.expect(await workbenchPage.queryCardContainer.nth(0).find(workbenchPage.cssTableViewTypeOption).visible).ok('The table view is not selected by default for command FT.SEARCH');
76+
await t.switchToIframe(workbenchPage.iframe);
77+
await t.expect(await workbenchPage.queryTableResult.visible).ok('The table result is not displayed for command FT.SEARCH');
78+
// Select Text view and check result
79+
await t.switchToMainWindow();
80+
await workbenchPage.selectViewTypeText();
81+
await t.expect(await workbenchPage.queryCardContainer.nth(0).find(workbenchPage.cssQueryTextResult).visible).ok('The result is not displayed in Text view');
82+
});
83+
test('Verify that user can switches between Table and Text for Client List and see results corresponding to their views', async t => {
8684
const command = 'CLIENT LIST';
8785
// Send command and check table view is default
8886
await workbenchPage.sendCommandInWorkbench(command);

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

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

@@ -12,7 +12,7 @@ const chance = new Chance();
1212
let indexName = chance.word({ length: 5 });
1313
let keyName = chance.word({ length: 5 });
1414

15-
fixture.only `Default scripts area at Workbench`
15+
fixture `Default scripts area at Workbench`
1616
.meta({type: 'critical_path', rte: rte.standalone})
1717
.page(commonUrl)
1818
.beforeEach(async t => {
@@ -26,85 +26,79 @@ fixture.only `Default scripts area at Workbench`
2626
await workbenchPage.sendCommandInWorkbench(`FT.DROPINDEX ${indexName} DD`);
2727
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
2828
});
29-
test
30-
// .meta({ env: env.desktop })
31-
('Verify that user can edit and run automatically added "FT._LIST" and "FT.INFO {index}" scripts in Workbench and see the results', async t => {
32-
indexName = chance.word({ length: 5 });
33-
keyName = chance.word({ length: 5 });
34-
const commandsForSend = [
35-
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA name TEXT`,
36-
`HMSET product:1 name "${keyName}"`,
37-
`HMSET product:2 name "${keyName}"`
38-
];
39-
// Send commands
40-
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
41-
// Run automatically added "FT._LIST" and "FT.INFO {index}" scripts
42-
await t.click(workbenchPage.documentButtonInQuickGuides);
43-
await t.click(workbenchPage.internalLinkWorkingWithHashes);
44-
await t.click(workbenchPage.preselectIndexInformation);
45-
// Replace the {index} with indexName value in script and send
46-
let addedScript = await workbenchPage.queryInputScriptArea.nth(2).textContent;
47-
addedScript = addedScript.replace('"idx:schools"', indexName);
48-
addedScript = addedScript.replace(/\s/g, ' ');
49-
await t.click(workbenchPage.submitCommandButton);
50-
await t.pressKey('ctrl+a delete');
51-
await workbenchPage.sendCommandInWorkbench(addedScript);
52-
// Check the FT._LIST result
53-
await t.expect(workbenchPage.queryTextResult.textContent).contains(indexName, 'The result of the FT._LIST command not found');
54-
// Check the FT.INFO result
55-
await t.switchToIframe(workbenchPage.iframe);
56-
await t.expect(workbenchPage.queryColumns.textContent).contains('name', 'The result of the FT.INFO command not found');
57-
});
58-
test
59-
// .meta({ env: env.desktop })
60-
('Verify that user can edit and run automatically added "Search" script in Workbench and see the results', async t => {
61-
indexName = chance.word({ length: 5 });
62-
keyName = chance.word({ length: 5 });
63-
const commandsForSend = [
64-
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA name TEXT`,
65-
`HMSET product:1 name "${keyName}"`,
66-
`HMSET product:2 name "${keyName}"`
67-
];
68-
const searchCommand = `FT.SEARCH ${indexName} "${keyName}"`;
69-
// Send commands
70-
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
71-
// Run automatically added FT.SEARCH script with edits
72-
await t.click(workbenchPage.documentButtonInQuickGuides);
73-
await t.click(workbenchPage.internalLinkWorkingWithHashes);
74-
await t.click(workbenchPage.preselectExactSearch);
75-
await t.pressKey('ctrl+a delete');
76-
await workbenchPage.sendCommandInWorkbench(searchCommand);
77-
// Check the FT.SEARCH result
78-
await t.switchToIframe(workbenchPage.iframe);
79-
const key = workbenchPage.queryTableResult.withText('product:1');
80-
const name = workbenchPage.queryTableResult.withText(keyName);
81-
await t.expect(key.exists).ok('The added key is not in the Search result');
82-
await t.expect(name.exists).ok('The added key name field is not in the Search result');
83-
});
84-
test
85-
// .meta({ env: env.desktop })
86-
('Verify that user can edit and run automatically added "Aggregate" script in Workbench and see the results', async t => {
87-
indexName = chance.word({ length: 5 });
88-
const aggregationResultField = 'max_price';
89-
const commandsForSend = [
90-
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA price NUMERIC SORTABLE`,
91-
'HMSET product:1 price 20',
92-
'HMSET product:2 price 100'
93-
];
94-
const searchCommand = `FT.Aggregate ${indexName} * GROUPBY 0 REDUCE MAX 1 @price AS ${aggregationResultField}`;
29+
test('Verify that user can edit and run automatically added "FT._LIST" and "FT.INFO {index}" scripts in Workbench and see the results', async t => {
30+
indexName = chance.word({ length: 5 });
31+
keyName = chance.word({ length: 5 });
32+
const commandsForSend = [
33+
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA name TEXT`,
34+
`HMSET product:1 name "${keyName}"`,
35+
`HMSET product:2 name "${keyName}"`
36+
];
9537
// Send commands
96-
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'), 0.5);
97-
// Run automatically added FT.Aggregate script with edits
98-
await t.click(workbenchPage.documentButtonInQuickGuides);
99-
await t.click(workbenchPage.internalLinkWorkingWithHashes);
100-
await t.click(workbenchPage.preselectGroupBy);
101-
await t.pressKey('ctrl+a delete');
102-
await workbenchPage.sendCommandInWorkbench(searchCommand);
103-
// Check the FT.Aggregate result
104-
await t.switchToIframe(workbenchPage.iframe);
105-
await t.expect(workbenchPage.queryTableResult.textContent).contains(aggregationResultField, 'The aggregation field name is not in the Search result');
106-
await t.expect(workbenchPage.queryTableResult.textContent).contains('100', 'The aggregation max value is in not the Search result');
107-
});
38+
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
39+
// Run automatically added "FT._LIST" and "FT.INFO {index}" scripts
40+
await t.click(workbenchPage.documentButtonInQuickGuides);
41+
await t.click(workbenchPage.internalLinkWorkingWithHashes);
42+
await t.click(workbenchPage.preselectIndexInformation);
43+
// Replace the {index} with indexName value in script and send
44+
let addedScript = await workbenchPage.queryInputScriptArea.nth(2).textContent;
45+
addedScript = addedScript.replace('"idx:schools"', indexName);
46+
addedScript = addedScript.replace(/\s/g, ' ');
47+
await t.click(workbenchPage.submitCommandButton);
48+
await t.pressKey('ctrl+a delete');
49+
await workbenchPage.sendCommandInWorkbench(addedScript);
50+
// Check the FT._LIST result
51+
await t.expect(workbenchPage.queryTextResult.textContent).contains(indexName, 'The result of the FT._LIST command not found');
52+
// Check the FT.INFO result
53+
await t.switchToIframe(workbenchPage.iframe);
54+
await t.expect(workbenchPage.queryColumns.textContent).contains('name', 'The result of the FT.INFO command not found');
55+
});
56+
test('Verify that user can edit and run automatically added "Search" script in Workbench and see the results', async t => {
57+
indexName = chance.word({ length: 5 });
58+
keyName = chance.word({ length: 5 });
59+
const commandsForSend = [
60+
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA name TEXT`,
61+
`HMSET product:1 name "${keyName}"`,
62+
`HMSET product:2 name "${keyName}"`
63+
];
64+
const searchCommand = `FT.SEARCH ${indexName} "${keyName}"`;
65+
// Send commands
66+
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'));
67+
// Run automatically added FT.SEARCH script with edits
68+
await t.click(workbenchPage.documentButtonInQuickGuides);
69+
await t.click(workbenchPage.internalLinkWorkingWithHashes);
70+
await t.click(workbenchPage.preselectExactSearch);
71+
await t.pressKey('ctrl+a delete');
72+
await workbenchPage.sendCommandInWorkbench(searchCommand);
73+
// Check the FT.SEARCH result
74+
await t.switchToIframe(workbenchPage.iframe);
75+
const key = workbenchPage.queryTableResult.withText('product:1');
76+
const name = workbenchPage.queryTableResult.withText(keyName);
77+
await t.expect(key.exists).ok('The added key is not in the Search result');
78+
await t.expect(name.exists).ok('The added key name field is not in the Search result');
79+
});
80+
test('Verify that user can edit and run automatically added "Aggregate" script in Workbench and see the results', async t => {
81+
indexName = chance.word({ length: 5 });
82+
const aggregationResultField = 'max_price';
83+
const commandsForSend = [
84+
`FT.CREATE ${indexName} ON HASH PREFIX 1 product: SCHEMA price NUMERIC SORTABLE`,
85+
'HMSET product:1 price 20',
86+
'HMSET product:2 price 100'
87+
];
88+
const searchCommand = `FT.Aggregate ${indexName} * GROUPBY 0 REDUCE MAX 1 @price AS ${aggregationResultField}`;
89+
// Send commands
90+
await workbenchPage.sendCommandInWorkbench(commandsForSend.join('\n'), 0.5);
91+
// Run automatically added FT.Aggregate script with edits
92+
await t.click(workbenchPage.documentButtonInQuickGuides);
93+
await t.click(workbenchPage.internalLinkWorkingWithHashes);
94+
await t.click(workbenchPage.preselectGroupBy);
95+
await t.pressKey('ctrl+a delete');
96+
await workbenchPage.sendCommandInWorkbench(searchCommand);
97+
// Check the FT.Aggregate result
98+
await t.switchToIframe(workbenchPage.iframe);
99+
await t.expect(workbenchPage.queryTableResult.textContent).contains(aggregationResultField, 'The aggregation field name is not in the Search result');
100+
await t.expect(workbenchPage.queryTableResult.textContent).contains('100', 'The aggregation max value is in not the Search result');
101+
});
108102
test('Verify that when the “Manual” option clicked, user can see the Editor is automatically prepopulated with the information', async t => {
109103
const information = [
110104
'// Workbench is the advanced Redis command-line interface that allows to send commands to Redis, read and visualize the replies sent by the server.',

0 commit comments

Comments
 (0)