1
- import { BrowserPage , WorkbenchPage } from '../../../../pageObjects' ;
1
+ import { BrowserPage , MyRedisDatabasePage , WorkbenchPage } from '../../../../pageObjects' ;
2
2
import { ExploreTabs , rte } from '../../../../helpers/constants' ;
3
3
import { DatabaseHelper } from '../../../../helpers/database' ;
4
- import { commonUrl , ossStandaloneConfig } from '../../../../helpers/conf' ;
4
+ import {
5
+ commonUrl ,
6
+ ossStandaloneConfig ,
7
+ ossStandaloneV5Config
8
+ } from '../../../../helpers/conf' ;
5
9
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database' ;
6
10
7
11
const browserPage = new BrowserPage ( ) ;
8
12
const workbenchPage = new WorkbenchPage ( ) ;
13
+ const myRedisDatabasePage = new MyRedisDatabasePage ( ) ;
9
14
10
15
const databaseHelper = new DatabaseHelper ( ) ;
11
16
const databaseAPIRequests = new DatabaseAPIRequests ( ) ;
@@ -30,3 +35,37 @@ test('Verify Explore redis tab is opened from empty screens', async t => {
30
35
await t . click ( workbenchPage . exploreRedisBtn ) ;
31
36
await t . expect ( await browserPage . InsightsPanel . getActiveTabName ( ) ) . eql ( ExploreTabs . Explore ) ;
32
37
} ) ;
38
+ test
39
+ . before ( async t => {
40
+ await databaseHelper . acceptLicenseTerms ( ) ;
41
+ await databaseAPIRequests . deleteAllDatabasesApi ( ) ;
42
+ await databaseAPIRequests . addNewStandaloneDatabaseApi ( ossStandaloneV5Config ) ;
43
+ await databaseAPIRequests . addNewStandaloneDatabaseApi ( ossStandaloneConfig , true ) ;
44
+ await browserPage . reloadPage ( ) ;
45
+
46
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneV5Config . databaseName ) ;
47
+
48
+ } )
49
+ . after ( async ( ) => {
50
+ await databaseAPIRequests . deleteAllDatabasesApi ( ) ;
51
+ } ) ( 'Verify that insights panel is opened in cloud db if users db does not have some module' , async t => {
52
+ await t . click ( browserPage . redisearchModeBtn ) ;
53
+ await t . click ( browserPage . closeDialogButton ) ;
54
+ await t . click ( browserPage . NavigationPanel . myRedisDBButton ) ;
55
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneConfig . databaseName ) ;
56
+ await t . expect ( browserPage . InsightsPanel . sidePanel . exists ) . ok ( 'the panel is opened' ) ;
57
+ await t . expect ( await browserPage . InsightsPanel . existsCompatibilityPopover . textContent ) . contains ( 'Search and Query capability' , 'popover is not displayed' ) ;
58
+ const tab = await browserPage . InsightsPanel . setActiveTab ( ExploreTabs . Explore ) ;
59
+ await t . expect ( tab . preselectArea . textContent ) . contains ( 'VECTOR SIMILARITY SEARCH' , 'the tutorial is incorrect' ) ;
60
+
61
+ await t . click ( browserPage . NavigationPanel . myRedisDBButton ) ;
62
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneV5Config . databaseName ) ;
63
+ await t . click ( browserPage . NavigationPanel . workbenchButton ) ;
64
+ await workbenchPage . sendCommandInWorkbench ( 'TS.' ) ;
65
+
66
+ await t . click ( browserPage . NavigationPanel . myRedisDBButton ) ;
67
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneConfig . databaseName ) ;
68
+ await t . expect ( browserPage . InsightsPanel . sidePanel . exists ) . ok ( 'the panel is opened' ) ;
69
+ await t . expect ( await browserPage . InsightsPanel . existsCompatibilityPopover . textContent ) . contains ( 'time series' , 'popover is not displayed' ) ;
70
+ await t . expect ( tab . preselectArea . textContent ) . contains ( 'REDIS FOR TIME SERIES' , 'the tutorial is incorrect' ) ;
71
+ } ) ;
0 commit comments