Skip to content

Commit 3f9b857

Browse files
e2e - add error mesages
1 parent abe2bbb commit 3f9b857

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

tests/e2e/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"test": "yarn test:chrome",
1818
"lint": "eslint . --ext .ts,.js,.tsx,.jsx",
1919
"test:desktop:ci": "ts-node ./desktop.runner.ts",
20-
"test:desktop": "testcafe electron tests/ --browser-init-timeout 180000 -e -r html:./report/desktop-report.html,spec -q attemptLimit=3,successThreshold=1"
20+
"test:desktop": "testcafe electron tests/ --browser-init-timeout 180000 -e -r html:./report/desktop-report.html,spec"
2121
},
2222
"keywords": [],
2323
"author": "",
@@ -26,13 +26,13 @@
2626
},
2727
"devDependencies": {
2828
"@types/chance": "1.1.3",
29-
"@types/edit-json-file": "^1.7.0",
29+
"@types/edit-json-file": "1.7.0",
3030
"@typescript-eslint/eslint-plugin": "^2.25.0",
3131
"@typescript-eslint/parser": "^2.25.0",
3232
"chance": "1.1.8",
3333
"cross-env": "^7.0.3",
3434
"dotenv-cli": "^5.0.0",
35-
"edit-json-file": "^1.7.0",
35+
"edit-json-file": "1.7.0",
3636
"eslint": "^6.8.0",
3737
"eslint-config-airbnb": "^18.2.0",
3838
"eslint-config-airbnb-typescript": "^9.0.0",

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import * as editJsonFile from 'edit-json-file';
1010
const myRedisDatabasePage = new MyRedisDatabasePage();
1111
const chance = new Chance();
1212

13-
const workingDirectory = join(os.homedir(), '.redisinsight-v2-stage');
13+
const workingDirectory = process.env.APP_FOLDER_ABSOLUTE_PATH
14+
|| (join(os.homedir(), process.env.APP_FOLDER_NAME || '.redisinsight-v2'));
1415
const buildPath = `${workingDirectory}/content/build.json`;
1516
const createRedisPath = `${workingDirectory}/content/create-redis.json`;
1617
const buildFilePath = editJsonFile(buildPath);
@@ -43,7 +44,7 @@ test
4344
const timestampAfterUpdate = await buildFilePathNew.get('timestamp');
4445
const cloudTitle = await createRedisFilePathNew.get('cloud.title');
4546
const cloudDescription = await createRedisFilePathNew.get('cloud.description');
46-
await t.expect(timestampAfterUpdate).notEql(timestampForEdit);
47-
await t.expect(cloudTitle).notEql(cloudValueForEdit);
48-
await t.expect(cloudDescription).notEql(cloudValueForEdit);
47+
await t.expect(timestampAfterUpdate).notEql(timestampForEdit, 'The timestamp in the build.json file is automatically updated');
48+
await t.expect(cloudTitle).notEql(cloudValueForEdit, 'The cloud title in the create-redis.json file is automatically updated');
49+
await t.expect(cloudDescription).notEql(cloudValueForEdit, 'The cloud description in the create-redis.json file is automatically updated');
4950
});

0 commit comments

Comments
 (0)