Skip to content

Commit d8c92f7

Browse files
e2e - fix tests
1 parent 2cab7ad commit d8c92f7

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/e2e/tests/critical-path/monitor/monitor.e2e.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,26 @@ import {
1010
commonUrl,
1111
ossStandaloneConfig
1212
} from '../../../helpers/conf';
13-
import { getRandomKeyName } from '../../../helpers/keys';
14-
import { rte, env } from '../../../helpers/constants';
13+
import { rte } from '../../../helpers/constants';
14+
import { Chance } from 'chance';
1515

1616
const myRedisDatabasePage = new MyRedisDatabasePage();
1717
const cliPage = new CliPage();
1818
const monitorPage = new MonitorPage();
1919
const workbenchPage = new WorkbenchPage();
2020
const browserPage = new BrowserPage();
21-
const keyName = `${getRandomKeyName(10)}-key`;
22-
const keyValue = `${getRandomKeyName(10)}-value`;
21+
const chance = new Chance();
22+
23+
const keyName = `${chance.word({ length: 20 })}-key`;
24+
const keyValue = `${chance.word({ length: 10 })}-value`;
2325

2426
fixture `Monitor`
2527
.meta({ type: 'critical_path' })
2628
.page(commonUrl)
27-
.beforeEach(async t => {
29+
.beforeEach(async() => {
2830
await acceptLicenseTermsAndAddDatabase(ossStandaloneConfig, ossStandaloneConfig.databaseName);
2931
})
30-
.afterEach(async t => {
32+
.afterEach(async() => {
3133
await deleteDatabase(ossStandaloneConfig.databaseName);
3234
})
3335
test
@@ -45,7 +47,7 @@ test
4547
await t.expect(monitorPage.startMonitorButton.exists).ok('Start profiler button');
4648
//Verify that user can see message inside Monitor "Running Monitor will decrease throughput, avoid running it in production databases." when opens it for the first time
4749
await t.expect(monitorPage.monitorWarningMessage.exists).ok('Profiler warning message');
48-
await monitorPage.monitorWarningMessage.withText('Running Profiler will decrease throughput, avoid running it in production databases');
50+
await t.expect(monitorPage.monitorWarningMessage.withText('Running Profiler will decrease throughput, avoid running it in production databases').exists).ok('Profiler warning message is correct');
4951
//Verify that user can run Monitor by clicking "Run" command in the message inside Monitor
5052
await t.click(monitorPage.startMonitorButton);
5153
await t.expect(monitorPage.monitorIsStartedText.innerText).eql('Profiler is started.');

0 commit comments

Comments
 (0)