@@ -17,6 +17,7 @@ let { host, port, databaseName, databaseUsername = '', databasePassword = '' } =
17
17
const redisConnect = 'redisinsight://databases/connect' ;
18
18
19
19
fixture `Add DB from SM`
20
+ . only
20
21
. meta ( { type : 'critical_path' , rte : rte . none } )
21
22
. afterEach ( async ( ) => {
22
23
// Delete all existing connections
34
35
} ;
35
36
36
37
await t . navigateTo ( generateLink ( connectUrlParams ) ) ;
37
- await t . expect ( await myRedisDatabasePage . AddRedisDatabase . hostInput . getAttribute ( 'value ' ) ) . eql ( host , 'Wrong host value' ) ;
38
- await t . expect ( await myRedisDatabasePage . AddRedisDatabase . portInput . getAttribute ( 'value ' ) ) . eql ( port , 'Wrong port value' ) ;
38
+ await t . expect ( await myRedisDatabasePage . AddRedisDatabase . disabledDatabaseInfo . nth ( 0 ) . find ( 'span' ) . getAttribute ( 'title ' ) ) . contains ( host , 'Wrong host value' ) ;
39
+ await t . expect ( await myRedisDatabasePage . AddRedisDatabase . disabledDatabaseInfo . nth ( 1 ) . find ( 'span' ) . getAttribute ( 'title ' ) ) . contains ( port , 'Wrong port value' ) ;
39
40
await t . click ( await myRedisDatabasePage . AddRedisDatabase . addRedisDatabaseButton ) ;
40
41
// wait for db is added
41
42
await t . wait ( 3_000 ) ;
61
62
const connectUrlParams = {
62
63
redisUrl : `redis://${ databaseUsername } :${ databasePassword } @${ host } :${ port } ` ,
63
64
databaseAlias : databaseName ,
64
- redirect : 'workbench?guidePath=/quick-guides/document/introduction.md'
65
+ redirect : 'workbench?guidePath=/quick-guides/document/introduction.md' ,
66
+ cloudId : '1232' ,
67
+ subscriptionType : 'fixed' ,
68
+ planMemoryLimit : '30' ,
69
+ memoryLimitMeasurementUnit : 'mb' ,
70
+ free : 'true'
65
71
} ;
66
72
67
73
await t . navigateTo ( generateLink ( connectUrlParams ) ) ;
68
74
await t . wait ( 3_000 ) ;
69
75
await t . expect ( await workbenchPage . closeEnablementPage . exists ) . ok ( 'Redirection to Workbench tutorial is not correct' ) ;
76
+
77
+ //Verify that the same db is not added
78
+ await t . navigateTo ( generateLink ( connectUrlParams ) ) ;
79
+ await t . wait ( 3_000 ) ;
80
+ await t . click ( await workbenchPage . NavigationPanel . myRedisDBButton ) ;
81
+ await t . expect ( await myRedisDatabasePage . dbNameList . child ( 'span' ) . withExactText ( databaseName ) . count ) . eql ( 2 , 'the same db is added twice' ) ;
70
82
} ) ;
71
83
72
84
function generateLink ( params : Record < string , any > ) : string {
0 commit comments