Skip to content

Commit 9172ba2

Browse files
committed
update-e2e-report
1 parent e68770e commit 9172ba2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.circleci/e2e-results.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ if (totalNodes > 1) {
66
parallelNodeInfo = ` (node: ${parseInt(process.env.CIRCLE_NODE_INDEX, 10) + 1}/${totalNodes})`
77
}
88

9-
const file = 'tests/e2e/results/e2e.results.json'
10-
const appBuildType = process.env.APP_BUILD_TYPE || 'Web'
9+
const file = fs.readdirSync('tests/e2e/mochawesome-report').find(file => file.endsWith('-setup-report.json'))
10+
const appBuildType = process.env.APP_BUILD_TYPE || 'VSCode (Linux)'
1111
const results = {
1212
message: {
1313
text: `*E2ETest - ${appBuildType}${parallelNodeInfo}* (Branch: *${process.env.CIRCLE_BRANCH}*)` +
@@ -19,22 +19,22 @@ const results = {
1919
const result = JSON.parse(fs.readFileSync(file, 'utf-8'))
2020
const testRunResult = {
2121
color: '#36a64f',
22-
title: `Started at: *${result.startTime}`,
23-
text: `Executed ${result.total} in ${(new Date(result.endTime) - new Date(result.startTime)) / 1000}s`,
22+
title: `Started at: *${result.stats.start}`,
23+
text: `Executed ${result.stats.tests} in ${(new Date(result.stats.end) - new Date(result.stats.start)) / 1000}s`,
2424
fields: [
2525
{
2626
title: 'Passed',
27-
value: result.passed,
27+
value: result.stats.passes,
2828
short: true,
2929
},
3030
{
3131
title: 'Skipped',
32-
value: result.skipped,
32+
value: result.stats.skipped,
3333
short: true,
3434
},
3535
],
3636
};
37-
const failed = result.total - result.passed;
37+
const failed = result.stats.tests - result.stats.passes;
3838
if (failed) {
3939
results.passed = false;
4040
testRunResult.color = '#cc0000';

tests/e2e/.ci.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
COMMON_URL=http://localhost:5541
22
API_URL=http://127.0.0.1:5541/api
33
OSS_SENTINEL_PASSWORD=password
4-
RI_APP_FOLDER_NAME=.redis-insight-vsc-stage
4+
RI_APP_FOLDER_NAME=.redis-for-vscode-stage
55
EXTENSION_NAME=redis-for-vscode-extension-linux-x64.vsix
66
RI_TEST=true
77

tests/e2e/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
API_URL=http://127.0.0.1:5541/api
22
RI_TEST=true
33
OSS_SENTINEL_PASSWORD=password
4-
RI_APP_FOLDER_NAME=.redis-insight-vsc-stage
4+
RI_APP_FOLDER_NAME=.redis-for-vscode-stage
55
VSCODE_VERSION=1.82.0
66
EXTENSION_NAME=redis-for-vscode-extension.vsix
77

tests/e2e/src/helpers/Conf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class Config {
1313

1414
static workingDirectory =
1515
process.env.APP_FOLDER_ABSOLUTE_PATH ||
16-
joinPath(os.homedir(), process.env.APP_FOLDER_NAME || '.redis-for-vscode')
16+
joinPath(os.homedir(), process.env.RI_APP_FOLDER_NAME || '.redis-for-vscode')
1717
static fileDownloadPath = joinPath(os.homedir(), 'Downloads')
1818
static uniqueId = chance.string({ length: 10 })
1919

0 commit comments

Comments
 (0)