@@ -8,33 +8,35 @@ import { commonUrl } from '../../../../helpers/conf';
8
8
import { RdiPopoverOptions , RedisOverviewPage } from '../../../../helpers/constants' ;
9
9
import { MyRedisDatabasePage } from '../../../../pageObjects' ;
10
10
import { DatabaseHelper } from '../../../../helpers' ;
11
+ import { RdiApiRequests } from '../../../../helpers/api/api-rdi' ;
11
12
12
13
const rdiInstancesListPage = new RdiInstancesListPage ( ) ;
13
14
const browserActions = new BrowserActions ( ) ;
14
15
const rdiInstancePage = new RdiInstancePage ( ) ;
15
16
const myRedisDatabasePage = new MyRedisDatabasePage ( ) ;
16
17
const databaseHelper = new DatabaseHelper ( ) ;
18
+ const rdiApiRequests = new RdiApiRequests ( ) ;
17
19
18
20
const rdiInstance : RdiInstance = {
19
21
alias : 'Alias' ,
20
- url : 'url ' ,
22
+ url : 'http://localhost:4000 ' ,
21
23
username : 'username' ,
22
- password : 'password ' ,
24
+ password : 'passwordPassword ' ,
23
25
version : '1.2'
24
26
} ;
25
27
const rdiInstance2 : RdiInstance = {
26
28
alias : 'test' ,
27
- url : 'http://test ' ,
29
+ url : 'http://localhost:4000 ' ,
28
30
username : 'name' ,
29
- password : 'pass ' ,
31
+ password : 'pass2024 ' ,
30
32
version : '1.2'
31
33
} ;
32
34
33
35
const rdiInstance3 : RdiInstance = {
34
36
alias : 'first' ,
35
- url : 'http://localhost:8080/ ' ,
37
+ url : 'http://localhost:4000 ' ,
36
38
username : 'name' ,
37
- password : 'pass ' ,
39
+ password : 'passPassword2024 ' ,
38
40
version : '1.2'
39
41
} ;
40
42
//skip the tests until rdi integration is added
@@ -44,6 +46,7 @@ fixture.skip `Rdi instance`
44
46
. page ( commonUrl )
45
47
. beforeEach ( async ( ) => {
46
48
await databaseHelper . acceptLicenseTerms ( ) ;
49
+ await rdiApiRequests . deleteAllRdiApi ( ) ;
47
50
await myRedisDatabasePage . setActivePage ( RedisOverviewPage . Rdi ) ;
48
51
49
52
} )
@@ -120,6 +123,12 @@ test('Verify that user has the same sorting if db name is changed', async t => {
120
123
await t . click ( rdiInstancesListPage . AddRdiInstance . addInstanceButton ) ;
121
124
122
125
rdiInstance . alias = newAliasName ;
126
+ const addRdiInstance = await rdiInstancesListPage . getRdiInstanceValuesByIndex ( 1 ) ;
127
+
128
+ await t . expect ( addRdiInstance . alias ) . eql ( rdiInstance . alias , 'added alias is not corrected' ) ;
129
+ await t . expect ( addRdiInstance . lastConnection ?. length ) . gt ( 1 , 'last connection is not displayed' ) ;
130
+ await t . expect ( addRdiInstance . url ) . eql ( rdiInstance . url , 'added alias is not corrected' ) ;
131
+ await t . expect ( addRdiInstance . version ) . eql ( rdiInstance . version , 'added alias is not corrected' ) ;
123
132
124
133
const sortedByAliasTypeUpdated = [ rdiInstance3 . alias , rdiInstance . alias , rdiInstance2 . alias ] ;
125
134
actualDatabaseList = await rdiInstancesListPage . getAllRdiNames ( ) ;
0 commit comments