@@ -8,9 +8,10 @@ import {
8
8
AddRedisDatabasePage
9
9
} from '../../../pageObjects' ;
10
10
import { rte } from '../../../helpers/constants' ;
11
- import { cloudDatabaseConfig , commonUrl , ossStandaloneConfig } from '../../../helpers/conf' ;
11
+ import { cloudDatabaseConfig , commonUrl , ossStandaloneRedisearch } from '../../../helpers/conf' ;
12
12
import { Common } from '../../../helpers/common' ;
13
13
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database' ;
14
+ import { deleteAllKeysFromDB } from '../../../helpers/keys' ;
14
15
15
16
const myRedisDatabasePage = new MyRedisDatabasePage ( ) ;
16
17
const workbenchPage = new WorkbenchPage ( ) ;
@@ -34,23 +35,23 @@ fixture `Database overview`
34
35
. page ( commonUrl )
35
36
. beforeEach ( async t => {
36
37
// Create databases and keys
37
- await acceptLicenseTermsAndAddDatabase ( ossStandaloneConfig , ossStandaloneConfig . databaseName ) ;
38
+ await acceptLicenseTermsAndAddDatabase ( ossStandaloneRedisearch , ossStandaloneRedisearch . databaseName ) ;
38
39
await browserPage . addStringKey ( keyName ) ;
39
40
await t . click ( myRedisDatabasePage . myRedisDBButton ) ;
40
- await addRedisDatabasePage . addLogicalRedisDatabase ( ossStandaloneConfig , index ) ;
41
- await myRedisDatabasePage . clickOnDBByName ( `${ ossStandaloneConfig . databaseName } [${ index } ]` ) ;
41
+ await addRedisDatabasePage . addLogicalRedisDatabase ( ossStandaloneRedisearch , index ) ;
42
+ await myRedisDatabasePage . clickOnDBByName ( `${ ossStandaloneRedisearch . databaseName } [${ index } ]` ) ;
42
43
keys = await common . createArrayWithKeyValue ( keysAmount ) ;
43
44
await cliPage . sendCommandInCli ( `MSET ${ keys . join ( ' ' ) } ` ) ;
44
45
} )
45
46
. afterEach ( async t => {
46
47
// Clear and delete databases
47
48
await t . click ( myRedisDatabasePage . myRedisDBButton ) ;
48
- await myRedisDatabasePage . clickOnDBByName ( `${ ossStandaloneConfig . databaseName } [${ index } ]` ) ;
49
+ await myRedisDatabasePage . clickOnDBByName ( `${ ossStandaloneRedisearch . databaseName } [${ index } ]` ) ;
49
50
await cliPage . sendCommandInCli ( `DEL ${ keys . join ( ' ' ) } ` ) ;
50
- await deleteDatabase ( `${ ossStandaloneConfig . databaseName } [${ index } ]` ) ;
51
- await myRedisDatabasePage . clickOnDBByName ( ossStandaloneConfig . databaseName ) ;
51
+ await deleteDatabase ( `${ ossStandaloneRedisearch . databaseName } [${ index } ]` ) ;
52
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneRedisearch . databaseName ) ;
52
53
await browserPage . deleteKeyByName ( keyName ) ;
53
- await deleteStandaloneDatabaseApi ( ossStandaloneConfig ) ;
54
+ await deleteStandaloneDatabaseApi ( ossStandaloneRedisearch ) ;
54
55
} ) ;
55
56
test
56
57
. meta ( { rte : rte . standalone } ) ( 'Verify that user can see total and current logical database number of keys (if there are any keys in other logical DBs)' , async t => {
64
65
65
66
// Open Database
66
67
await t . click ( myRedisDatabasePage . myRedisDBButton ) ;
67
- await myRedisDatabasePage . clickOnDBByName ( ossStandaloneConfig . databaseName ) ;
68
+ await myRedisDatabasePage . clickOnDBByName ( ossStandaloneRedisearch . databaseName ) ;
68
69
await t . hover ( workbenchPage . overviewTotalKeys ) ;
69
70
// Verify that user can see total number of keys and not it current logical database (if there are no any keys in other logical DBs)
70
71
await t . expect ( browserPage . tooltip . visible ) . ok ( 'Total keys tooltip not displayed' ) ;
0 commit comments