Skip to content

Commit d2aec2d

Browse files
authored
Merge pull request #1878 from RedisInsight/e2e/bugfix/regression-fixes
E2e/bugfix/regression fixes
2 parents 5e634ad + e4f68ab commit d2aec2d

File tree

7 files changed

+28
-28
lines changed

7 files changed

+28
-28
lines changed
-486 KB
Binary file not shown.
1.01 MB
Binary file not shown.

tests/e2e/tests/critical-path/browser/bulk-delete.e2e.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { BrowserPage, BulkActionsPage, MyRedisDatabasePage } from '../../../page
44
import { commonUrl, ossStandaloneRedisearch } from '../../../helpers/conf';
55
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
66
import { Common } from '../../../helpers/common';
7-
import { addHashKeyApi, addSetKeyApi } from '../../../helpers/api/api-keys';
87
import { deleteAllKeysFromDB, populateDBWithHashes } from '../../../helpers/keys';
98

109
const browserPage = new BrowserPage();
@@ -13,8 +12,6 @@ const common = new Common();
1312
const myRedisDatabasePage = new MyRedisDatabasePage();
1413

1514
const keyNames = [common.generateWord(20), common.generateWord(20)];
16-
const hashKeyParameters = { keyName: keyNames[0], fields: [{ field: common.generateWord(20), value: common.generateWord(20) }] };
17-
const setKeyParameters = { keyName: keyNames[1], members: [common.generateWord(20)] };
1815
const dbParameters = { host: ossStandaloneRedisearch.host, port: ossStandaloneRedisearch.port };
1916
const keyToAddParameters = { keysCount: 10000, keyNameStartWith: 'hashKey'};
2017
const keyToAddParameters2 = { keysCount: 500000, keyNameStartWith: 'hashKey'};
@@ -24,8 +21,8 @@ fixture `Bulk Delete`
2421
.page(commonUrl)
2522
.beforeEach(async() => {
2623
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
27-
await addHashKeyApi(hashKeyParameters, ossStandaloneRedisearch);
28-
await addSetKeyApi(setKeyParameters, ossStandaloneRedisearch);
24+
await browserPage.addHashKey(keyNames[0], '100000', common.generateWord(20), common.generateWord(20));
25+
await browserPage.addSetKey(keyNames[1], '100000', common.generateWord(20));
2926
})
3027
.afterEach(async() => {
3128
// Clear and delete database
@@ -134,7 +131,7 @@ test('Verify that when bulk deletion is completed, status Action completed is di
134131
test
135132
.before(async() => {
136133
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
137-
await addSetKeyApi(setKeyParameters, ossStandaloneRedisearch);
134+
await browserPage.addSetKey(keyNames[1], '100000', common.generateWord(20));
138135
// Add 10000 Hash keys
139136
await populateDBWithHashes(dbParameters.host, dbParameters.port, keyToAddParameters);
140137
// Filter by Hash keys

tests/e2e/tests/critical-path/browser/search-capabilities.e2e.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ test
264264
await myRedisDatabasePage.clickOnDBByName(simpleDbName); // click standalone database
265265
await cliPage.sendCommandInCli(`FT.DROPINDEX ${indexNameSimpleDb}`);
266266
await t.click(browserPage.patternModeBtn);
267+
await t.click(browserPage.browserViewButton);
267268
await browserPage.deleteKeysByNames(keyNames);
268269

269270
//delete database

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ test('Verify that user can edit and run automatically added "Aggregate" script i
114114
await t.expect(workbenchPage.queryTableResult.textContent).contains(aggregationResultField, 'The aggregation field name is not in the Search result');
115115
await t.expect(workbenchPage.queryTableResult.textContent).contains('100', 'The aggregation max value is in not the Search result');
116116
});
117-
test('Verify that when the “Manual” option clicked, user can see the Editor is automatically prepopulated with the information', async t => {
117+
// Outdated after https://redislabs.atlassian.net/browse/RI-4279
118+
test.skip('Verify that when the “Manual” option clicked, user can see the Editor is automatically prepopulated with the information', async t => {
118119
const information = [
119120
'// Workbench is the advanced Redis command-line interface that allows to send commands to Redis, read and visualize the replies sent by the server.',
120121
'// Enter multiple commands at different rows to run them at once.',

tests/e2e/tests/critical-path/workbench/scripting-area.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fixture `Scripting area at Workbench`
3030
// Update after resolving https://redislabs.atlassian.net/browse/RI-3299
3131
test('Verify that user can resize scripting area in Workbench', async t => {
3232
const commandForSend = 'info';
33-
const offsetY = 100;
33+
const offsetY = 130;
3434

3535
await workbenchPage.sendCommandInWorkbench(commandForSend);
3636
// Verify that user can run any script from CLI in Workbench and see the results
@@ -41,9 +41,9 @@ test('Verify that user can resize scripting area in Workbench', async t => {
4141
const inputHeightStart = await workbenchPage.queryInput.clientHeight;
4242

4343
await t.hover(workbenchPage.resizeButtonForScriptingAndResults);
44-
await t.drag(workbenchPage.resizeButtonForScriptingAndResults, 0, offsetY, { speed: 0.4 });
44+
await t.drag(workbenchPage.resizeButtonForScriptingAndResults, 0, offsetY, { speed: 0.1 });
4545
// Verify that user can resize scripting area
46-
const inputHeightEnd = inputHeightStart + 20;
46+
const inputHeightEnd = inputHeightStart + 15;
4747
await t.expect(await workbenchPage.queryInput.clientHeight).gt(inputHeightEnd, 'Scripting area after resize has incorrect size');
4848
});
4949
test('Verify that user when he have more than 10 results can request to view more results in Workbench', async t => {

tests/e2e/tests/regression/workbench/import-tutorials.e2e.ts

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ import {
66
import { MyRedisDatabasePage, WorkbenchPage } from '../../../pageObjects';
77
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
88
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
9-
import {Common} from '../../../helpers/common';
109

1110
const myRedisDatabasePage = new MyRedisDatabasePage();
1211
const workbenchPage = new WorkbenchPage();
13-
const common = new Common();
14-
const filePath = path.join('..', '..', '..', 'test-data', 'upload-tutorials', 'sample.zip');
15-
const tutorialName = `tutorialName-${common.generateWord(10)}`;
16-
const link = 'https://drive.google.com/uc?export=download&id=1mlyDKWLu12L02FblOPh15EwG2Vy_FhJ7';
12+
const filePath = path.join('..', '..', '..', 'test-data', 'upload-tutorials', 'testTutorials.zip');
13+
const tutorialName = 'testTutorials';
14+
const tutorialName2 = 'tutorialTestByLink';
15+
const link = 'https://drive.google.com/uc?id=1puRUoT8HmyZCekkeWNxBzXe_48TzXcJc&export=download';
1716
let folder1 = 'folder-1';
1817
let folder2 = 'folder-2';
1918
let internalLinkName1 = 'probably-1';
@@ -29,7 +28,7 @@ fixture `Upload custom tutorials`
2928
.afterEach(async() => {
3029
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
3130
});
32-
// https://redislabs.atlassian.net/browse/RI-4186, https://redislabs.atlassian.net/browse/RI-4198
31+
// https://redislabs.atlassian.net/browse/RI-4186, https://redislabs.atlassian.net/browse/RI-4198, https://redislabs.atlassian.net/browse/RI-4302
3332
test('Verify that user can upload tutorial with local zip file without manifest.json', async t => {
3433
// Verify that user can upload custom tutorials on docker version
3534
folder1 = 'folder-1';
@@ -39,8 +38,6 @@ test('Verify that user can upload tutorial with local zip file without manifest.
3938
// Verify that user can see the “MY TUTORIALS” section in the Enablement area.
4039
await t.expect(workbenchPage.customTutorials.visible).ok('custom tutorials sections is not visible');
4140
await t.click(workbenchPage.tutorialOpenUploadButton);
42-
// Verify that User can enter a tutorial name
43-
await t.typeText(workbenchPage.tutorialNameField, tutorialName);
4441
await t.expect(workbenchPage.tutorialSubmitButton.hasAttribute('disabled')).ok('submit button is not disabled');
4542
// Verify that User can request to add a new custom Tutorial by uploading a .zip archive from a local folder
4643
await t.setFilesToUpload(workbenchPage.tutorialImport, [filePath]);
@@ -50,10 +47,12 @@ test('Verify that user can upload tutorial with local zip file without manifest.
5047
await t.click(workbenchPage.tutorialAccordionButton.withText(tutorialName));
5148
await t.expect((await workbenchPage.getAccordionButtonWithName(folder1)).visible).ok(`${folder1} is not visible`);
5249
await t.expect((await workbenchPage.getAccordionButtonWithName(folder2)).visible).ok(`${folder2} is not visible`);
50+
await t.click(await workbenchPage.getAccordionButtonWithName(folder1));
5351
await t.expect((await workbenchPage.getInternalLinkWithManifest(internalLinkName1)).visible)
5452
.ok(`${internalLinkName1} is not visible`);
53+
await t.click(await workbenchPage.getAccordionButtonWithName(folder2));
5554
await t.expect((await workbenchPage.getInternalLinkWithManifest(internalLinkName2)).visible)
56-
.ok(`${internalLinkName2} is not visible`);
55+
.ok(`${internalLinkName1} is not visible`);
5756
await t.expect(workbenchPage.scrolledEnablementArea.exists).notOk('enablement area is visible before clicked');
5857
await t.click((await workbenchPage.getInternalLinkWithManifest(internalLinkName1)));
5958
await t.expect(workbenchPage.scrolledEnablementArea.visible).ok('enablement area is not visible after clicked');
@@ -66,21 +65,23 @@ test('Verify that user can upload tutorial with local zip file without manifest.
6665
await t.expect((workbenchPage.tutorialAccordionButton.withText(tutorialName).exists))
6766
.notOk(`${tutorialName} tutorial is not uploaded`);
6867
});
69-
// https://redislabs.atlassian.net/browse/RI-4186, https://redislabs.atlassian.net/browse/RI-4213
68+
// https://redislabs.atlassian.net/browse/RI-4186, https://redislabs.atlassian.net/browse/RI-4213, https://redislabs.atlassian.net/browse/RI-4302
7069
test('Verify that user can upload tutorial with URL with manifest.json', async t => {
71-
internalLinkName1 = 'working_probably';
70+
const labelFromManifest = 'LabelFromManifest';
71+
internalLinkName1 = 'manifest-id';
7272

7373
await t.click(workbenchPage.tutorialOpenUploadButton);
74-
await t.typeText(workbenchPage.tutorialNameField, tutorialName);
7574
// Verify that user can upload tutorials using a URL
7675
await t.typeText(workbenchPage.tutorialLinkField, link);
7776
await t.click(workbenchPage.tutorialSubmitButton);
78-
await t.expect(workbenchPage.tutorialAccordionButton.withText(tutorialName).with({ timeout: 20000 }).visible)
79-
.ok(`${tutorialName} tutorial is not uploaded`);
80-
await t.click(workbenchPage.tutorialAccordionButton.withText(tutorialName));
77+
await t.expect(workbenchPage.tutorialAccordionButton.withText(tutorialName2).with({ timeout: 20000 }).visible)
78+
.ok(`${tutorialName2} tutorial is not uploaded`);
79+
await t.click(workbenchPage.tutorialAccordionButton.withText(tutorialName2));
8180
// Verify that User can see the same structure in the tutorial uploaded as described in the .json manifest
8281
await t.expect((await workbenchPage.getInternalLinkWithoutManifest(internalLinkName1)).visible)
83-
.ok(`${internalLinkName1} folder is not visible`);
82+
.ok(`${internalLinkName1} folder specified in manifest is not visible`);
83+
await t.expect(await (await workbenchPage.getInternalLinkWithoutManifest(internalLinkName1)).textContent)
84+
.eql(labelFromManifest, `${labelFromManifest} tutorial specified in manifest is not visible`);
8485
await t.click((await workbenchPage.getInternalLinkWithoutManifest(internalLinkName1)));
8586
await t.expect(workbenchPage.scrolledEnablementArea.visible).ok('enablement area is not visible after clicked');
8687
await t.click(workbenchPage.closeEnablementPage);
@@ -89,6 +90,6 @@ test('Verify that user can upload tutorial with URL with manifest.json', async t
8990
await t.click(workbenchPage.tutorialDeleteButton);
9091
await t.expect(workbenchPage.tutorialDeleteButton.exists).notOk('Delete popup is still visible');
9192
// Verify that when User delete the tutorial, then User can see this tutorial and relevant markdown files are deleted from: the Enablement area in Workbench
92-
await t.expect((workbenchPage.tutorialAccordionButton.withText(tutorialName).exists))
93-
.notOk(`${tutorialName} tutorial is not uploaded`);
93+
await t.expect((workbenchPage.tutorialAccordionButton.withText(tutorialName2).exists))
94+
.notOk(`${tutorialName2} tutorial is not uploaded`);
9495
});

0 commit comments

Comments
 (0)