Skip to content

Commit edf4ee1

Browse files
committed
fix for failed test
1 parent b056910 commit edf4ee1

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed
Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
1+
import { Chance } from 'chance';
12
import { addNewStandaloneDatabase, acceptLicenseTerms } from '../../../helpers/database';
23
import { rte } from '../../../helpers/constants';
34
import { MyRedisDatabasePage } from '../../../pageObjects';
45
import { commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
6+
const chance = new Chance();
57

68
const myRedisDatabasePage = new MyRedisDatabasePage();
9+
const uniqueId = chance.string({ length: 10 });
10+
let database = {
11+
...ossStandaloneConfig,
12+
databaseName: `test_standalone-${uniqueId}`
13+
};
714

815
fixture `Delete database`
916
.meta({ type: 'smoke' })
1017
.page(commonUrl)
1118
.beforeEach(async() => {
1219
await acceptLicenseTerms();
20+
database = {
21+
...ossStandaloneConfig,
22+
databaseName: `test_standalone-${uniqueId}`
23+
};
1324
});
1425
test
1526
.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 });
1930
});

0 commit comments

Comments
 (0)