File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
tests/e2e/tests/smoke/database Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ import { Chance } from 'chance' ;
1
2
import { addNewStandaloneDatabase , acceptLicenseTerms } from '../../../helpers/database' ;
2
3
import { rte } from '../../../helpers/constants' ;
3
4
import { MyRedisDatabasePage } from '../../../pageObjects' ;
4
5
import { commonUrl , ossStandaloneConfig } from '../../../helpers/conf' ;
6
+ const chance = new Chance ( ) ;
5
7
6
8
const myRedisDatabasePage = new MyRedisDatabasePage ( ) ;
9
+ const uniqueId = chance . string ( { length : 10 } ) ;
10
+ let database = {
11
+ ...ossStandaloneConfig ,
12
+ databaseName : `test_standalone-${ uniqueId } `
13
+ } ;
7
14
8
15
fixture `Delete database`
9
16
. meta ( { type : 'smoke' } )
10
17
. page ( commonUrl )
11
18
. beforeEach ( async ( ) => {
12
19
await acceptLicenseTerms ( ) ;
20
+ database = {
21
+ ...ossStandaloneConfig ,
22
+ databaseName : `test_standalone-${ uniqueId } `
23
+ } ;
13
24
} ) ;
14
25
test
15
26
. meta ( { rte : rte . standalone } ) ( 'Verify that user can delete databases' , async t => {
16
- await addNewStandaloneDatabase ( ossStandaloneConfig ) ;
17
- await myRedisDatabasePage . deleteDatabaseByName ( ossStandaloneConfig . databaseName ) ;
18
- await t . expect ( myRedisDatabasePage . dbNameList . withExactText ( ossStandaloneConfig . databaseName ) . exists ) . notOk ( 'The database not deleted' , { timeout : 10000 } ) ;
27
+ await addNewStandaloneDatabase ( database ) ;
28
+ await myRedisDatabasePage . deleteDatabaseByName ( database . databaseName ) ;
29
+ await t . expect ( myRedisDatabasePage . dbNameList . withExactText ( database . databaseName ) . exists ) . notOk ( 'The database not deleted' , { timeout : 10000 } ) ;
19
30
} ) ;
You can’t perform that action at this time.
0 commit comments