Skip to content

Commit 280b9b2

Browse files
committed
fixes
1 parent 8242aaf commit 280b9b2

File tree

4 files changed

+12
-23
lines changed

4 files changed

+12
-23
lines changed

tests/e2e/helpers/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as path from 'path';
22
import * as fs from 'fs';
3-
import * as archiver from 'archiver';
43
import { ClientFunction, RequestMock, t } from 'testcafe';
54
import { Chance } from 'chance';
65
import { apiUrl, commonUrl } from './conf';
6+
const archiver = require('archiver');
77

88
const chance = new Chance();
99

tests/e2e/pageObjects/workbench-page.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class WorkbenchPage extends InstancePage {
3636
preselectCreateHashIndex = Selector('[data-testid="preselect-Create a hash index"]');
3737
preselectGroupBy = Selector('[data-testid*=preselect-Group]');
3838
preselectButtons = Selector('[data-testid^=preselect-]');
39+
copyBtn = Selector('[data-testid^=copy-btn-]');
3940
reRunCommandButton = Selector('[data-testid=re-run-command]');
4041
preselectManual = Selector('[data-testid=preselect-Manual]');
4142
fullScreenButton = Selector('[data-testid=toggle-full-screen]');

tests/e2e/tests/web/critical-path/memory-efficiency/recommendations.e2e.ts

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,28 +89,19 @@ test
8989
.eql(expandedTextContaiterSize, 'Lua script recommendation not expanded');
9090
});
9191
// skipped due to inability to receive no recommendations for now
92-
test
93-
.before(async() => {
94-
await databaseHelper.acceptLicenseTerms();
95-
// Add Sentinel databases
96-
await databaseAPIRequests.discoverSentinelDatabaseApi(ossSentinelConfig);
97-
await myRedisDatabasePage.reloadPage();
98-
})
99-
.after(async() => {
100-
// Delete all primary groups
101-
await databaseAPIRequests.deleteAllDatabasesByConnectionTypeApi('SENTINEL');
102-
await myRedisDatabasePage.reloadPage();
103-
})
104-
.meta({ rte: rte.sentinel })('No recommendations message', async t => {
92+
test.skip('No recommendations message', async t => {
10593
keyName = `recomKey-${Common.generateWord(10)}`;
106-
const noRecommendationsMessage = 'No recommendations at the moment, run a new report later to keep up the good work!';
94+
const noRecommendationsMessage = 'No Tips at the moment,keep up the good work!';
10795
const command = `HSET ${keyName} field value`;
10896

10997
// Create Hash key and create report
11098
await browserPage.Cli.sendCommandInCli(command);
99+
// Go to Analysis Tools page
100+
await t.click(myRedisDatabasePage.NavigationPanel.analysisPageButton);
111101
await t.click(memoryEfficiencyPage.newReportBtn);
112102
// Go to Recommendations tab
113103
await t.click(memoryEfficiencyPage.recommendationsTab);
104+
await t.debug()
114105
// No recommendations message
115106
await t.expect(memoryEfficiencyPage.noRecommendationsMessage.textContent).eql(noRecommendationsMessage, 'No recommendations message not displayed');
116107
});
@@ -203,7 +194,6 @@ test
203194
// Verify that tutorial opened
204195
await t.click(memoryEfficiencyPage.getToTutorialBtnByRecomName(searchJsonRecommendation));
205196
await workbenchPage.InsightsPanel.togglePanel(true);
206-
await t.expect(await workbenchPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Tutorials);
207197
const tutorial = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
208198
await t.expect(tutorial.preselectArea.visible).ok('Workbench Enablement area not opened');
209199
// Verify that REDIS FOR TIME SERIES tutorial expanded

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,28 +82,26 @@ test('Verify that user can see saved article in Enablement area when he leaves W
8282
selector = tutorials.getRunSelector('Create a hash');
8383
await t.expect(selector.visible).ok('The end of the page is not visible');
8484
});
85-
//skipped due the issue RI-2384
8685
test('Verify that user can see saved scroll position in Enablement area when he leaves Workbench page and goes back again', async t => {
8786
// Open Working with Hashes section
8887
await workbenchPage.InsightsPanel.togglePanel(true);
8988
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Tutorials);
9089
await t.click(tutorials.dataStructureAccordionTutorialButton);
9190
await t.click(tutorials.internalLinkWorkingWithHashes);
9291
// Evaluate the last button in Enablement Area
93-
const buttonsQuantity = await workbenchPage.preselectButtons.count;
94-
const lastButton = workbenchPage.preselectButtons.nth(buttonsQuantity - 1);
92+
const buttonsQuantity = await workbenchPage.copyBtn.count;
93+
const lastButton = workbenchPage.copyBtn.nth(buttonsQuantity - 1);
9594
// Scroll to the very bottom of the page
9695
await t.scrollIntoView(lastButton);
96+
await workbenchPage.InsightsPanel.togglePanel(false);
97+
await workbenchPage.InsightsPanel.togglePanel(true);
9798
// Check the scroll position
9899
const scrollPosition = await workbenchPage.scrolledEnablementArea.scrollTop;
99-
// Go to Browser page
100-
await t.click(myRedisDatabasePage.NavigationPanel.browserButton);
101-
// Go back to Workbench page
102-
await t.click(myRedisDatabasePage.NavigationPanel.workbenchButton);
103100
// Check that scroll position is saved
104101
await t.expect(await workbenchPage.scrolledEnablementArea.scrollTop).eql(scrollPosition, 'The scroll position status is incorrect');
105102
// Go to list of DBs page
106103
await t.click(myRedisDatabasePage.NavigationPanel.myRedisDBButton);
104+
await t.wait(1000)
107105
// Go back to active DB again
108106
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
109107
// Check that scroll position is saved

0 commit comments

Comments
 (0)