Skip to content

Commit 58dd8bf

Browse files
Merge pull request #2947 from RedisInsight/e2e/feature/RI-5256_rename-recommendations
E2e/feature/ri 5256 rename recommendations
2 parents 1d4eca3 + d5d7d26 commit 58dd8bf

File tree

8 files changed

+39
-31
lines changed

8 files changed

+39
-31
lines changed

tests/e2e/helpers/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export enum ResourcePath {
7777
}
7878

7979
export enum ExploreTabs {
80-
Explore = 'Explore Redis',
81-
Recommendations = 'Redis Tips',
80+
Explore = 'Explore',
81+
Tips = 'Tips',
8282
}
8383

tests/e2e/pageObjects/components/insights-panel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class InsightsPanel {
3636
* @param type of the tab
3737
*/
3838
async setActiveTab(type: ExploreTabs.Explore): Promise<ExploreTab>
39-
async setActiveTab(type: ExploreTabs.Recommendations): Promise<RecommendationsTab>
39+
async setActiveTab(type: ExploreTabs.Tips): Promise<RecommendationsTab>
4040
async setActiveTab(type: ExploreTabs): Promise<ExploreTab | RecommendationsTab> {
4141
if(type === ExploreTabs.Explore) {
4242
await t.click(this.exploreTab);
@@ -51,7 +51,7 @@ export class InsightsPanel {
5151
* Get Insights panel selector
5252
*/
5353
getInsightsPanel(): Selector {
54-
return Selector('[class=euiButton__text]').withExactText(ExploreTabs.Recommendations);
54+
return Selector('[class=euiButton__text]').withExactText(ExploreTabs.Tips);
5555
}
5656

5757
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test
4545
})('No reports/keys message and report tooltip', async t => {
4646
const noReportsMessage = 'No Reports foundRun "New Analysis" to generate first report.';
4747
const noKeysMessage = 'No keys to displayUse Workbench Guides and Tutorials to quickly load the data.';
48-
const tooltipText = 'Analyze up to 10 000 keys to get an overview of your data and recommendations';
48+
const tooltipText = 'Analyze up to 10 000 keys to get an overview of your data and tips';
4949

5050
// Verify that user can see the “No reports found” message when report wasn't generated
5151
await t.expect(memoryEfficiencyPage.noReportsText.textContent).eql(noReportsMessage, 'No reports message not displayed or text is invalid');

tests/e2e/tests/web/regression/insights/feature-flag.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ test
8989
await browserPage.InsightsPanel.togglePanel(true);
9090
await t.expect(browserPage.InsightsPanel.getInsightsPanel().exists).ok('Insights panel not displayed for the other db connection');
9191
await browserPage.InsightsPanel.togglePanel(true);
92-
const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
92+
const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
9393
await t.expect(tab.getRecommendationByName(redisVersionRecom).exists).ok('Redis Version recommendation not displayed');
9494

9595
await browserPage.InsightsPanel.togglePanel(false);

tests/e2e/tests/web/regression/insights/import-tutorials.e2e.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,14 @@ test
114114
.notOk(`${tutorialName} tutorial is not uploaded`);
115115
});
116116
// https://redislabs.atlassian.net/browse/RI-4186, https://redislabs.atlassian.net/browse/RI-4213, https://redislabs.atlassian.net/browse/RI-4302
117-
test('Verify that user can upload tutorial with URL with manifest.json', async t => {
117+
test.after(async() => {
118+
tutorialName = 'Tutorials with manifest';
119+
const tutorials = await workbenchPage.InsightsPanel.setActiveTab(ExploreTabs.Explore);
120+
if(await tutorials.tutorialAccordionButton.withText(tutorialName).exists) {
121+
await tutorials.deleteTutorialByName(tutorialName);
122+
}
123+
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneConfig);
124+
})('Verify that user can upload tutorial with URL with manifest.json', async t => {
118125
const labelFromManifest = 'Working with JSON label';
119126
const link = 'https://drive.google.com/u/2/uc?id=1a45zHZGYYvtKgM83Rff6rfjy1yfWiwHt&export=download';
120127
internalLinkName1 = 'manifest-id';

tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const databasesForAdding = [
2727
const tenSecondsTimeout = 10000;
2828
const keyName = `recomKey-${Common.generateWord(10)}`;
2929
const logger = telemetry.createLogger();
30-
const telemetryEvent = 'INSIGHTS_RECOMMENDATION_VOTED';
30+
const telemetryEvent = 'INSIGHTS_TIPS_VOTED';
3131
const expectedProperties = [
3232
'buildType',
3333
'databaseId',
@@ -83,10 +83,10 @@ test
8383
})('Verify Insights panel Recommendations displaying', async t => {
8484
await browserPage.InsightsPanel.togglePanel(true);
8585
// Verify that "Welcome to recommendations" panel displayed when there are no recommendations
86-
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
86+
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
8787
await t
88-
.expect(tab.noRecommendationsScreen.exists).ok('No recommendations panel not displayed')
89-
.expect(tab.noRecommendationsScreen.textContent).contains('Welcome toRecommendations', 'Welcome to recommendations text not displayed');
88+
.expect(tab.noRecommendationsScreen.exists).ok('No tips panel not displayed')
89+
.expect(tab.noRecommendationsScreen.textContent).contains('Welcome toTips!', 'Welcome to recommendations text not displayed');
9090

9191
await browserPage.InsightsPanel.togglePanel(false);
9292
// Go to 2nd database
@@ -95,7 +95,7 @@ test
9595
await browserPage.InsightsPanel.togglePanel(true);
9696
// Verify that live recommendations displayed for each database separately
9797
// Verify that user can see the live recommendation "Update Redis database" when Redis database is less than 6.0 highlighted as RedisStack
98-
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
98+
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
9999
await t
100100
.expect(await tab.getRecommendationByName(redisVersionRecom).visible).ok('Redis Version recommendation not displayed')
101101
.expect(await tab.getRecommendationByName(redisTimeSeriesRecom).visible).notOk('Optimize Time Series recommendation displayed');
@@ -106,7 +106,7 @@ test
106106
// Verify that the list of recommendations updated every 10 seconds
107107
await t.wait(tenSecondsTimeout);
108108
await browserPage.InsightsPanel.togglePanel(true);
109-
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
109+
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
110110
// Verify that user can see the live recommendation "Optimize the use of time series"
111111
await t.expect(await tab.getRecommendationByName(redisTimeSeriesRecom).visible).ok('Optimize Time Series recommendation not displayed');
112112
});
@@ -127,7 +127,7 @@ test
127127
const notUsefulVoteOption = 'not useful';
128128
const usefulVoteOption = 'useful';
129129
await browserPage.InsightsPanel.togglePanel(true);
130-
await t.expect(await browserPage.InsightsPanel.getActiveTabName()).contains(ExploreTabs.Recommendations);
130+
await t.expect(await browserPage.InsightsPanel.getActiveTabName()).contains(ExploreTabs.Tips);
131131
await recommendationsActions.voteForRecommendation(redisVersionRecom, notUsefulVoteOption);
132132
// Verify that user can rate recommendations with one of 2 existing types at the same time
133133
await recommendationsActions.verifyVoteIsSelected(redisVersionRecom, notUsefulVoteOption);
@@ -143,7 +143,7 @@ test
143143
// Verify that user can see previous votes when reload the page
144144
await browserPage.reloadPage();
145145
await browserPage.InsightsPanel.togglePanel(true);
146-
const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
146+
const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
147147
await tab.toggleRecommendation(redisVersionRecom, true);
148148
await recommendationsActions.verifyVoteIsSelected(redisVersionRecom, notUsefulVoteOption);
149149

@@ -157,10 +157,10 @@ test('Verify that user can hide recommendations and checkbox value is saved', as
157157
await browserPage.Cli.sendCommandInCli(commandToGetRecommendation);
158158

159159
await browserPage.InsightsPanel.togglePanel(true);
160-
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
160+
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
161161
await t.click(browserPage.InsightsPanel.closeButton);
162162
await browserPage.InsightsPanel.togglePanel(true);
163-
await t.expect(await browserPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Recommendations);
163+
await t.expect(await browserPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Tips);
164164
await tab.toggleShowHiddenRecommendations(false);
165165
await tab.hideRecommendation(searchVisualizationRecom);
166166
await t.expect(await tab.getRecommendationByName(searchVisualizationRecom).exists)
@@ -169,7 +169,7 @@ test('Verify that user can hide recommendations and checkbox value is saved', as
169169
// check recommendation state is saved after reload
170170
await browserPage.reloadPage();
171171
await browserPage.InsightsPanel.togglePanel(true);
172-
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
172+
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
173173
await t.expect(await tab.getRecommendationByName(searchVisualizationRecom).exists)
174174
.notOk('recommendation is displayed when show hide recommendation is unchecked');
175175

@@ -179,7 +179,7 @@ test('Verify that user can hide recommendations and checkbox value is saved', as
179179
.ok('recommendation is not displayed when show hide recommendation is checked');
180180
await browserPage.reloadPage();
181181
await browserPage.InsightsPanel.togglePanel(true);
182-
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
182+
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
183183
await t.expect(await tab.getRecommendationByName(searchVisualizationRecom).visible)
184184
.ok('recommendation is not displayed when show hide recommendation is checked');
185185
});
@@ -188,18 +188,18 @@ test('Verify that user can snooze recommendation', async t => {
188188
await browserPage.Cli.sendCommandInCli(commandToGetRecommendation);
189189

190190
await browserPage.InsightsPanel.togglePanel(true);
191-
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
191+
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
192192
await tab.snoozeRecommendation(searchVisualizationRecom);
193193

194194
await browserPage.reloadPage();
195195
await browserPage.InsightsPanel.togglePanel(true);
196-
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
196+
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
197197
await t.expect(await tab.getRecommendationByName(searchVisualizationRecom).visible)
198198
.notOk('recommendation is displayed when after snoozing');
199199
await browserPage.InsightsPanel.togglePanel(false);
200200
await browserPage.Cli.sendCommandInCli(commandToGetRecommendation);
201201
await browserPage.InsightsPanel.togglePanel(true);
202-
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
202+
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
203203
await t.expect(await tab.getRecommendationByName(searchVisualizationRecom).visible).ok('recommendation is not displayed again');
204204
});
205205
test
@@ -217,7 +217,7 @@ test
217217
})('Verify that recommendations from database analysis are displayed in Insight panel above live recommendations', async t => {
218218

219219
await browserPage.InsightsPanel.togglePanel(true);
220-
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
220+
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
221221
const redisVersionRecommendationSelector = tab.getRecommendationByName(redisVersionRecom);
222222
// Verify that live recommendation displayed in Insights panel
223223
await t.expect(await tab.getRecommendationByName(redisVersionRecom).visible).ok(`${redisVersionRecom} recommendation not displayed`);
@@ -228,7 +228,7 @@ test
228228
await t.click(myRedisDatabasePage.NavigationPanel.analysisPageButton);
229229
await t.click(memoryEfficiencyPage.newReportBtn);
230230
await browserPage.InsightsPanel.togglePanel(true);
231-
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
231+
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
232232
// Verify that recommendations are synchronized
233233
await t.expect(await tab.getRecommendationByName(setPasswordRecom).visible).ok('Recommendations are not synchronized');
234234
// Verify that duplicates are not displayed
@@ -237,15 +237,15 @@ test
237237
//https://redislabs.atlassian.net/browse/RI-4413
238238
test('Verify that if user clicks on the Analyze button and link, the pop up with analyze button is displayed and new report is generated', async t => {
239239
await browserPage.InsightsPanel.togglePanel(true);
240-
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
240+
let tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
241241
await t.click(tab.analyzeDatabaseButton);
242242
await t.click(tab.analyzeTooltipButton);
243243
//Verify that user is navigated to DB Analysis page via Analyze button and new report is generated
244244
await t.click(memoryEfficiencyPage.selectedReport);
245245
await t.expect(memoryEfficiencyPage.reportItem.visible).ok('Database analysis page not opened');
246246
await t.click(memoryEfficiencyPage.NavigationPanel.workbenchButton);
247247
await workbenchPage.InsightsPanel.togglePanel(true);
248-
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
248+
tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
249249
await t.click(tab.analyzeDatabaseLink);
250250
await t.click(tab.analyzeTooltipButton);
251251
//Verify that user is navigated to DB Analysis page via Analyze link and new report is generated
@@ -263,7 +263,7 @@ test
263263
await browserPage.Cli.sendCommandInCli(cliCommand);
264264
await t.click(browserPage.refreshKeysButton);
265265
await browserPage.InsightsPanel.togglePanel(true);
266-
const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
266+
const tab = await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
267267
let keyNameFromRecommendation = await tab.getRecommendationByName(RecommendationIds.searchJson)
268268
.find(tab.cssKeyName)
269269
.innerText;

tests/e2e/tests/web/regression/insights/open-insights-panel.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test('Verify Explore redis tab is opened from empty screens', async t => {
2424
await t.click(browserPage.openTutorialsBtn);
2525
await t.expect(browserPage.InsightsPanel.sidePanel.exists).ok('the panel is opened');
2626
await t.expect(await browserPage.InsightsPanel.getActiveTabName()).eql(ExploreTabs.Explore);
27-
await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Recommendations);
27+
await browserPage.InsightsPanel.setActiveTab(ExploreTabs.Tips);
2828
await browserPage.InsightsPanel.togglePanel(false);
2929
await t.click(browserPage.NavigationPanel.workbenchButton);
3030
await t.click(workbenchPage.exploreRedisBtn);

tests/e2e/tests/web/regression/tree-view/tree-view.e2e.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ test
3939
// Delete database
4040
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
4141
})('Verify that user can see message "No keys to display." when there are no keys in the database', async t => {
42-
const message = 'No Keys Found\nCreate your first key to get started\nKeys are the foundation of Redis. Create your first key to start exploring Redis and Redis Stack capabilities';
43-
42+
const message = 'NoKeystoDisplayCreateyourfirstkeytogetstartedKeysarethefoundationofRedis.CreateyourfirstkeyortryourinteractiveTutorialstolearnhowRediscansolveyourusecases.+KeyorExplore';
43+
const actualMessage = await browserPage.keyListMessage.innerText;
44+
const cleanMessage = actualMessage.replace(/[\s\n]+/g, '');
4445
// Verify the message
4546
await t.click(browserPage.treeViewButton);
46-
await t.expect(browserPage.keyListMessage.innerText).contains(message, 'The message is not displayed');
47+
await t.expect(cleanMessage).contains(message, 'The message is not displayed');
4748
await t.expect(browserPage.guideLinksBtn.count).gte(5);
4849
await browserPage.clickGuideLinksByName('JSON');
4950
await t.expect(workbenchPage.queryInput.visible).ok('Workbench page is not opened');

0 commit comments

Comments
 (0)