1
1
import { rte } from '../../../../helpers/constants' ;
2
2
import { DatabaseHelper } from '../../../../helpers/database' ;
3
3
import { BrowserPage , MyRedisDatabasePage } from '../../../../pageObjects' ;
4
- import { commonUrl , ossStandaloneConfig } from '../../../../helpers/conf' ;
4
+ import {
5
+ commonUrl ,
6
+ ossStandaloneConfig ,
7
+ ossStandaloneV8Config
8
+ } from '../../../../helpers/conf' ;
5
9
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database' ;
6
10
7
11
const myRedisDatabasePage = new MyRedisDatabasePage ( ) ;
@@ -23,7 +27,7 @@ fixture `Redis Stack`
23
27
} )
24
28
. afterEach ( async ( ) => {
25
29
// Delete database
26
- await databaseAPIRequests . deleteStandaloneDatabaseApi ( ossStandaloneConfig ) ;
30
+ await databaseAPIRequests . deleteAllDatabasesApi ( ) ;
27
31
} ) ;
28
32
test ( 'Verify that user can see module list Redis Stack icon hovering (without Redis Stack text)' , async t => {
29
33
// Verify that user can see Redis Stack icon when Redis Stack DB is added in the application
@@ -47,3 +51,16 @@ test('Verify that user can see Redis Stack icon in Edit mode near the DB name',
47
51
const databaseName = myRedisDatabasePage . redisStackIcon . parent ( ) . nextSibling ( ) ;
48
52
await t . expect ( databaseName . withAttribute ( 'data-testid' , 'edit-alias-btn' ) . exists ) . ok ( 'Edit button not found' ) ;
49
53
} ) ;
54
+ test . before ( async ( ) => {
55
+ // Add new databases using API
56
+ await databaseHelper . acceptLicenseTerms ( ) ;
57
+ await databaseAPIRequests . addNewStandaloneDatabaseApi ( ossStandaloneV8Config ) ;
58
+ // Reload Page
59
+ await browserPage . reloadPage ( ) ;
60
+ } ) ( 'Verify that Redis Stack is not displayed for stack >8' , async t => {
61
+ // Verify that user can not see Redis Stack icon when Redis Stack DB > 8 is added in the application
62
+ await t . expect ( myRedisDatabasePage . redisStackIcon . visible ) . notOk ( 'Redis Stack icon found' ) ;
63
+ await t . click ( myRedisDatabasePage . editDatabaseButton ) ;
64
+ // Check redis stack icon near the db name
65
+ await t . expect ( myRedisDatabasePage . redisStackIcon . visible ) . notOk ( 'Redis Stack icon found' ) ;
66
+ } ) ;
0 commit comments