Skip to content

Commit cdf3815

Browse files
authored
Merge pull request #584 from RedisInsight/feature/e2e-test-fixes
Feature/e2e test fixes
2 parents c87ab9b + 15faab2 commit cdf3815

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/e2e/tests/critical-path/database/autoupdate-of-json.e2e.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { join } from 'path';
2+
import * as os from 'os';
3+
import { Chance } from 'chance';
4+
import * as editJsonFile from 'edit-json-file';
15
import { acceptLicenseTerms } from '../../../helpers/database';
26
import { MyRedisDatabasePage } from '../../../pageObjects';
37
import { commonUrl } from '../../../helpers/conf';
48
import { rte, env } from '../../../helpers/constants';
5-
import { Chance } from 'chance';
6-
import { join } from 'path';
7-
import * as os from 'os';
8-
import * as editJsonFile from 'edit-json-file';
99

1010
const myRedisDatabasePage = new MyRedisDatabasePage();
1111
const chance = new Chance();
@@ -16,26 +16,26 @@ const buildPath = `${workingDirectory}/content/build.json`;
1616
const createRedisPath = `${workingDirectory}/content/create-redis.json`;
1717
const buildFilePath = editJsonFile(buildPath);
1818
const createRedisFilePath = editJsonFile(createRedisPath);
19-
const timestampBeforeUpdate = buildFilePath.get("timestamp");
19+
const timestampBeforeUpdate = buildFilePath.get('timestamp');
2020
const timestampForEdit = timestampBeforeUpdate - 1;
2121
const cloudValueForEdit = chance.word({ length: 10 });
2222

23+
//Edit json file values
24+
createRedisFilePath.set('cloud.title', cloudValueForEdit);
25+
createRedisFilePath.set('cloud.description', cloudValueForEdit);
26+
createRedisFilePath.save();
27+
buildFilePath.set('timestamp', timestampForEdit);
28+
buildFilePath.save();
29+
2330
fixture `Automatically update information`
2431
.meta({type: 'critical_path'})
2532
.page(commonUrl)
26-
.beforeEach(async () => {
33+
.beforeEach(async() => {
2734
await acceptLicenseTerms();
28-
//Edit json file values
29-
createRedisFilePath.set('cloud.title', cloudValueForEdit);
30-
createRedisFilePath.set('cloud.description', cloudValueForEdit);
31-
createRedisFilePath.save();
32-
buildFilePath.set('timestamp', timestampForEdit);
33-
buildFilePath.save();
34-
})
35+
});
3536
test
36-
.meta({ rte: rte.standalone, env: env.desktop })
37-
('Verify that user has the ability to update "Create free database" button without changing the app', async t => {
38-
//Create new file paths due to cacheability
37+
.meta({ rte: rte.standalone, env: env.desktop })('Verify that user has the ability to update "Create free database" button without changing the app', async t => {
38+
//Create new file paths due to cache-ability
3939
const buildFilePathNew = editJsonFile(buildPath);
4040
const createRedisFilePathNew = editJsonFile(createRedisPath);
4141
//Check the promo button after the opening of app

0 commit comments

Comments
 (0)