@@ -2,7 +2,7 @@ import * as path from 'path';
2
2
import { BrowserPage , MemoryEfficiencyPage , MyRedisDatabasePage , WorkbenchPage } from '../../../../pageObjects' ;
3
3
import { ExploreTabs , RecommendationIds , rte } from '../../../../helpers/constants' ;
4
4
import { DatabaseHelper } from '../../../../helpers/database' ;
5
- import { commonUrl , ossStandaloneConfig , ossStandaloneV5Config } from '../../../../helpers/conf' ;
5
+ import { commonUrl , ossStandaloneConfig , ossStandaloneV5Config , ossStandaloneV7Config } from '../../../../helpers/conf' ;
6
6
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database' ;
7
7
import { Common } from '../../../../helpers/common' ;
8
8
import { Telemetry } from '../../../../helpers/telemetry' ;
@@ -22,7 +22,7 @@ const apiKeyRequests = new APIKeyRequests();
22
22
23
23
const databasesForAdding = [
24
24
{ host : ossStandaloneV5Config . host , port : ossStandaloneV5Config . port , databaseName : ossStandaloneV5Config . databaseName } ,
25
- { host : ossStandaloneConfig . host , port : ossStandaloneConfig . port , databaseName : ossStandaloneConfig . databaseName }
25
+ { host : ossStandaloneV7Config . host , port : ossStandaloneV7Config . port , databaseName : ossStandaloneV7Config . databaseName }
26
26
] ;
27
27
const tenSecondsTimeout = 10000 ;
28
28
const keyName = `recomKey-${ Common . generateWord ( 10 ) } ` ;
@@ -206,56 +206,55 @@ test('Verify that user can snooze recommendation', async t => {
206
206
tab = await browserPage . InsightsPanel . setActiveTab ( ExploreTabs . Tips ) ;
207
207
await t . expect ( await tab . getRecommendationByName ( searchVisualizationRecom ) . visible ) . ok ( 'recommendation is not displayed again' ) ;
208
208
} ) ;
209
+ test ( 'Verify that recommendations from database analysis are displayed in Insight panel above live recommendations' , async t => {
210
+ await browserPage . InsightsPanel . togglePanel ( true ) ;
211
+ let tab = await browserPage . InsightsPanel . setActiveTab ( ExploreTabs . Tips ) ;
212
+ const redisVersionRecommendationSelector = tab . getRecommendationByName ( redisVersionRecom ) ;
213
+ // Verify that live recommendation displayed in Insights panel
214
+ await t . expect ( await tab . getRecommendationByName ( redisVersionRecom ) . visible ) . ok ( `${ redisVersionRecom } recommendation not displayed` ) ;
215
+ // Verify that recommendation from db analysis not displayed in Insights panel
216
+ await t . expect ( await tab . getRecommendationByName ( setPasswordRecom ) . visible ) . notOk ( `${ setPasswordRecom } recommendation displayed` ) ;
217
+ await browserPage . InsightsPanel . togglePanel ( false ) ;
218
+ // Go to Analysis Tools page
219
+ await t . click ( myRedisDatabasePage . NavigationPanel . analysisPageButton ) ;
220
+ await t . click ( memoryEfficiencyPage . newReportBtn ) ;
221
+ await browserPage . InsightsPanel . togglePanel ( true ) ;
222
+ tab = await browserPage . InsightsPanel . setActiveTab ( ExploreTabs . Tips ) ;
223
+ // Verify that recommendations are synchronized
224
+ await t . expect ( await tab . getRecommendationByName ( setPasswordRecom ) . visible ) . ok ( 'Recommendations are not synchronized' ) ;
225
+ // Verify that duplicates are not displayed
226
+ await t . expect ( redisVersionRecommendationSelector . count ) . eql ( 1 , `${ redisVersionRecom } recommendation duplicated` ) ;
227
+ } ) ;
228
+ //https://redislabs.atlassian.net/browse/RI-4413
209
229
test
210
230
. before ( async ( ) => {
211
231
await databaseHelper . acceptLicenseTerms ( ) ;
212
232
await refreshFeaturesTestData ( ) ;
213
233
await modifyFeaturesConfigJson ( featuresConfig ) ;
214
234
await updateControlNumber ( 47.2 ) ;
215
- await databaseAPIRequests . addNewStandaloneDatabaseApi ( ossStandaloneV5Config ) ;
235
+ await databaseAPIRequests . addNewStandaloneDatabaseApi ( ossStandaloneV7Config ) ;
216
236
await myRedisDatabasePage . reloadPage ( ) ;
217
- await myRedisDatabasePage . clickOnDBByName ( ossStandaloneV5Config . databaseName ) ;
237
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneV7Config . databaseName ) ;
218
238
} ) . after ( async ( ) => {
219
- await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneV5Config ) ;
239
+ await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneV7Config ) ;
220
240
await refreshFeaturesTestData ( ) ;
221
- } ) ( 'Verify that recommendations from database analysis are displayed in Insight panel above live recommendations' , async t => {
222
-
241
+ } ) ( '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 => {
223
242
await browserPage . InsightsPanel . togglePanel ( true ) ;
224
243
let tab = await browserPage . InsightsPanel . setActiveTab ( ExploreTabs . Tips ) ;
225
- const redisVersionRecommendationSelector = tab . getRecommendationByName ( redisVersionRecom ) ;
226
- // Verify that live recommendation displayed in Insights panel
227
- await t . expect ( await tab . getRecommendationByName ( redisVersionRecom ) . visible ) . ok ( `${ redisVersionRecom } recommendation not displayed` ) ;
228
- // Verify that recommendation from db analysis not displayed in Insights panel
229
- await t . expect ( await tab . getRecommendationByName ( setPasswordRecom ) . visible ) . notOk ( `${ setPasswordRecom } recommendation displayed` ) ;
230
- await browserPage . InsightsPanel . togglePanel ( false ) ;
231
- // Go to Analysis Tools page
232
- await t . click ( myRedisDatabasePage . NavigationPanel . analysisPageButton ) ;
233
- await t . click ( memoryEfficiencyPage . newReportBtn ) ;
234
- await browserPage . InsightsPanel . togglePanel ( true ) ;
244
+ await t . click ( tab . analyzeDatabaseButton ) ;
245
+ await t . click ( tab . analyzeTooltipButton ) ;
246
+ //Verify that user is navigated to DB Analysis page via Analyze button and new report is generated
247
+ await t . click ( memoryEfficiencyPage . selectedReport ) ;
248
+ await t . expect ( memoryEfficiencyPage . reportItem . visible ) . ok ( 'Database analysis page not opened' ) ;
249
+ await t . click ( memoryEfficiencyPage . NavigationPanel . workbenchButton ) ;
250
+ await workbenchPage . InsightsPanel . togglePanel ( true ) ;
235
251
tab = await browserPage . InsightsPanel . setActiveTab ( ExploreTabs . Tips ) ;
236
- // Verify that recommendations are synchronized
237
- await t . expect ( await tab . getRecommendationByName ( setPasswordRecom ) . visible ) . ok ( 'Recommendations are not synchronized' ) ;
238
- // Verify that duplicates are not displayed
239
- await t . expect ( redisVersionRecommendationSelector . count ) . eql ( 1 , `${ redisVersionRecom } recommendation duplicated` ) ;
252
+ await t . click ( tab . analyzeDatabaseLink ) ;
253
+ await t . click ( tab . analyzeTooltipButton ) ;
254
+ //Verify that user is navigated to DB Analysis page via Analyze link and new report is generated
255
+ await t . click ( memoryEfficiencyPage . selectedReport ) ;
256
+ await t . expect ( memoryEfficiencyPage . reportItem . count ) . eql ( 2 , 'report was not generated' ) ;
240
257
} ) ;
241
- //https://redislabs.atlassian.net/browse/RI-4413
242
- 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 => {
243
- await browserPage . InsightsPanel . togglePanel ( true ) ;
244
- let tab = await browserPage . InsightsPanel . setActiveTab ( ExploreTabs . Tips ) ;
245
- await t . click ( tab . analyzeDatabaseButton ) ;
246
- await t . click ( tab . analyzeTooltipButton ) ;
247
- //Verify that user is navigated to DB Analysis page via Analyze button and new report is generated
248
- await t . click ( memoryEfficiencyPage . selectedReport ) ;
249
- await t . expect ( memoryEfficiencyPage . reportItem . visible ) . ok ( 'Database analysis page not opened' ) ;
250
- await t . click ( memoryEfficiencyPage . NavigationPanel . workbenchButton ) ;
251
- await workbenchPage . InsightsPanel . togglePanel ( true ) ;
252
- tab = await browserPage . InsightsPanel . setActiveTab ( ExploreTabs . Tips ) ;
253
- await t . click ( tab . analyzeDatabaseLink ) ;
254
- await t . click ( tab . analyzeTooltipButton ) ;
255
- //Verify that user is navigated to DB Analysis page via Analyze link and new report is generated
256
- await t . click ( memoryEfficiencyPage . selectedReport ) ;
257
- await t . expect ( memoryEfficiencyPage . reportItem . count ) . eql ( 2 , 'report was not generated' ) ;
258
- } ) ;
259
258
//https://redislabs.atlassian.net/browse/RI-4493
260
259
test
261
260
. after ( async ( ) => {
0 commit comments