@testomatio/reporter 2.0.1-beta-ignore-xml → 2.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/adapter/codecept.js +0 -2
- package/lib/adapter/cypress-plugin/index.js +0 -2
- package/lib/adapter/mocha.js +0 -1
- package/lib/adapter/nightwatch.d.ts +4 -0
- package/lib/adapter/nightwatch.js +80 -0
- package/lib/adapter/webdriver.d.ts +1 -1
- package/lib/adapter/webdriver.js +17 -8
- package/lib/bin/cli.js +126 -8
- package/lib/bin/reportXml.js +4 -2
- package/lib/bin/startTest.js +3 -2
- package/lib/bin/uploadArtifacts.js +5 -4
- package/lib/client.js +18 -9
- package/lib/config.js +2 -2
- package/lib/data-storage.d.ts +1 -1
- package/lib/data-storage.js +17 -7
- package/lib/junit-adapter/csharp.d.ts +1 -0
- package/lib/junit-adapter/csharp.js +11 -1
- package/lib/pipe/bitbucket.d.ts +2 -0
- package/lib/pipe/bitbucket.js +38 -26
- package/lib/pipe/debug.js +17 -3
- package/lib/pipe/github.d.ts +2 -2
- package/lib/pipe/github.js +35 -3
- package/lib/pipe/gitlab.d.ts +2 -0
- package/lib/pipe/gitlab.js +27 -9
- package/lib/pipe/html.d.ts +1 -0
- package/lib/pipe/html.js +1 -3
- package/lib/pipe/index.js +17 -7
- package/lib/pipe/testomatio.d.ts +2 -1
- package/lib/pipe/testomatio.js +79 -73
- package/lib/reporter.d.ts +12 -12
- package/lib/services/artifacts.d.ts +1 -1
- package/lib/services/key-values.d.ts +1 -1
- package/lib/services/logger.d.ts +1 -1
- package/lib/services/logger.js +1 -2
- package/lib/template/testomatio.hbs +443 -68
- package/lib/uploader.js +2 -2
- package/lib/utils/utils.d.ts +2 -0
- package/lib/utils/utils.js +41 -18
- package/lib/xmlReader.js +54 -19
- package/package.json +8 -9
- package/src/adapter/codecept.js +0 -2
- package/src/adapter/cypress-plugin/index.js +0 -2
- package/src/adapter/mocha.js +0 -1
- package/src/adapter/nightwatch.js +88 -0
- package/src/adapter/webdriver.js +1 -2
- package/src/bin/cli.js +131 -2
- package/src/bin/reportXml.js +4 -1
- package/src/bin/startTest.js +2 -1
- package/src/bin/uploadArtifacts.js +2 -1
- package/src/client.js +1 -2
- package/src/config.js +2 -2
- package/src/junit-adapter/csharp.js +13 -1
- package/src/pipe/bitbucket.js +22 -24
- package/src/pipe/debug.js +18 -3
- package/src/pipe/github.js +1 -2
- package/src/pipe/gitlab.js +27 -9
- package/src/pipe/html.js +3 -4
- package/src/pipe/testomatio.js +98 -103
- package/src/services/logger.js +1 -2
- package/src/template/testomatio.hbs +443 -68
- package/src/uploader.js +2 -2
- package/src/utils/utils.js +19 -9
- package/src/xmlReader.js +69 -17
package/lib/pipe/bitbucket.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -30,7 +40,7 @@ exports.BitbucketPipe = void 0;
|
|
|
30
40
|
const constants_js_1 = require("../constants.js");
|
|
31
41
|
const utils_js_1 = require("../utils/utils.js");
|
|
32
42
|
const pipe_utils_js_1 = require("../utils/pipe_utils.js");
|
|
33
|
-
const
|
|
43
|
+
const gaxios_1 = require("gaxios");
|
|
34
44
|
const picocolors_1 = __importDefault(require("picocolors"));
|
|
35
45
|
const humanize_duration_1 = __importDefault(require("humanize-duration"));
|
|
36
46
|
const lodash_merge_1 = __importDefault(require("lodash.merge"));
|
|
@@ -59,6 +69,13 @@ class BitbucketPipe {
|
|
|
59
69
|
return;
|
|
60
70
|
}
|
|
61
71
|
this.isEnabled = true;
|
|
72
|
+
this.client = new gaxios_1.Gaxios({
|
|
73
|
+
baseURL: 'https://api.bitbucket.org/2.0',
|
|
74
|
+
headers: {
|
|
75
|
+
'Content-Type': 'application/json',
|
|
76
|
+
'Authorization': `Bearer ${this.token}`
|
|
77
|
+
}
|
|
78
|
+
});
|
|
62
79
|
debug('Bitbucket Pipe: Enabled');
|
|
63
80
|
}
|
|
64
81
|
async cleanLog(log) {
|
|
@@ -158,18 +175,17 @@ class BitbucketPipe {
|
|
|
158
175
|
}
|
|
159
176
|
// Construct Bitbucket API URL for comments
|
|
160
177
|
// eslint-disable-next-line max-len
|
|
161
|
-
const commentsRequestURL =
|
|
178
|
+
const commentsRequestURL = `/repositories/${this.ENV.BITBUCKET_WORKSPACE}/${this.ENV.BITBUCKET_REPO_SLUG}/pullrequests/${this.ENV.BITBUCKET_PR_ID}/comments`;
|
|
162
179
|
// Delete previous report
|
|
163
|
-
await deletePreviousReport(
|
|
180
|
+
await deletePreviousReport(this.client, commentsRequestURL, this.hiddenCommentData);
|
|
164
181
|
// Add current report
|
|
165
182
|
debug(`Adding comment via URL: ${commentsRequestURL}`);
|
|
166
183
|
debug(`Final Bitbucket API call body: ${body}`);
|
|
167
184
|
try {
|
|
168
|
-
const addCommentResponse = await
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
},
|
|
185
|
+
const addCommentResponse = await this.client.request({
|
|
186
|
+
method: 'POST',
|
|
187
|
+
url: commentsRequestURL,
|
|
188
|
+
data: { content: { raw: body } }
|
|
173
189
|
});
|
|
174
190
|
const commentID = addCommentResponse.data.id;
|
|
175
191
|
// eslint-disable-next-line max-len
|
|
@@ -188,17 +204,15 @@ class BitbucketPipe {
|
|
|
188
204
|
updateRun() { }
|
|
189
205
|
}
|
|
190
206
|
exports.BitbucketPipe = BitbucketPipe;
|
|
191
|
-
async function deletePreviousReport(
|
|
207
|
+
async function deletePreviousReport(client, commentsRequestURL, hiddenCommentData) {
|
|
192
208
|
if (process.env.BITBUCKET_KEEP_OUTDATED_REPORTS)
|
|
193
209
|
return;
|
|
194
210
|
// Get comments
|
|
195
211
|
let comments = [];
|
|
196
212
|
try {
|
|
197
|
-
const response = await
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
'Content-Type': 'application/json',
|
|
201
|
-
},
|
|
213
|
+
const response = await client.request({
|
|
214
|
+
method: 'GET',
|
|
215
|
+
url: commentsRequestURL
|
|
202
216
|
});
|
|
203
217
|
comments = response.data.values;
|
|
204
218
|
}
|
|
@@ -213,11 +227,9 @@ async function deletePreviousReport(axiosInstance, commentsRequestURL, hiddenCom
|
|
|
213
227
|
try {
|
|
214
228
|
// Delete previous comment
|
|
215
229
|
const deleteCommentURL = `${commentsRequestURL}/${comment.id}`;
|
|
216
|
-
await
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
'Content-Type': 'application/json',
|
|
220
|
-
},
|
|
230
|
+
await client.request({
|
|
231
|
+
method: 'DELETE',
|
|
232
|
+
url: deleteCommentURL
|
|
221
233
|
});
|
|
222
234
|
}
|
|
223
235
|
catch (e) {
|
package/lib/pipe/debug.js
CHANGED
|
@@ -27,7 +27,21 @@ class DebugPipe {
|
|
|
27
27
|
this.logFilePath = path_1.default.join(os_1.default.tmpdir(), `testomatio.debug.${Date.now()}.json`);
|
|
28
28
|
debug('Creating debug file:', this.logFilePath);
|
|
29
29
|
fs_1.default.writeFileSync(this.logFilePath, '');
|
|
30
|
-
|
|
30
|
+
// Create symlink to ensure consistent path to latest debug file
|
|
31
|
+
const symlinkPath = path_1.default.join(os_1.default.tmpdir(), 'testomatio.debug.latest.json');
|
|
32
|
+
try {
|
|
33
|
+
// Remove existing symlink if it exists
|
|
34
|
+
if (fs_1.default.existsSync(symlinkPath)) {
|
|
35
|
+
fs_1.default.unlinkSync(symlinkPath);
|
|
36
|
+
}
|
|
37
|
+
// Create new symlink pointing to the timestamped debug file
|
|
38
|
+
fs_1.default.symlinkSync(this.logFilePath, symlinkPath);
|
|
39
|
+
debug('Created symlink:', symlinkPath, '->', this.logFilePath);
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
debug('Failed to create symlink:', err.message);
|
|
43
|
+
}
|
|
44
|
+
console.log(constants_js_1.APP_PREFIX, '🪲 Debug file created');
|
|
31
45
|
this.testomatioEnvVars = Object.keys(process.env)
|
|
32
46
|
.filter(key => key.startsWith('TESTOMATIO_'))
|
|
33
47
|
.reduce((acc, key) => {
|
|
@@ -93,11 +107,11 @@ class DebugPipe {
|
|
|
93
107
|
async finishRun(params) {
|
|
94
108
|
if (!this.isEnabled)
|
|
95
109
|
return;
|
|
96
|
-
this.logToFile({ actions: 'finishRun', params });
|
|
97
110
|
await this.batchUpload();
|
|
98
111
|
if (this.batch.intervalFunction)
|
|
99
112
|
clearInterval(this.batch.intervalFunction);
|
|
100
|
-
|
|
113
|
+
this.logToFile({ actions: 'finishRun', params });
|
|
114
|
+
console.log(constants_js_1.APP_PREFIX, '🪲 Debug Saved to', this.logFilePath);
|
|
101
115
|
}
|
|
102
116
|
toString() {
|
|
103
117
|
return 'Debug Reporter';
|
package/lib/pipe/github.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ declare class GitHubPipe implements Pipe {
|
|
|
23
23
|
createRun(): Promise<void>;
|
|
24
24
|
addTest(test: any): void;
|
|
25
25
|
finishRun(runParams: any): Promise<void>;
|
|
26
|
-
octokit: import("@octokit/core").Octokit & {
|
|
26
|
+
octokit: import("@octokit/core").Octokit & import("@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.js").RestEndpointMethods & import("@octokit/plugin-rest-endpoint-methods").Api & {
|
|
27
27
|
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
toString(): string;
|
|
30
30
|
}
|
package/lib/pipe/github.js
CHANGED
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
@@ -8,7 +41,6 @@ const path_1 = __importDefault(require("path"));
|
|
|
8
41
|
const picocolors_1 = __importDefault(require("picocolors"));
|
|
9
42
|
const humanize_duration_1 = __importDefault(require("humanize-duration"));
|
|
10
43
|
const lodash_merge_1 = __importDefault(require("lodash.merge"));
|
|
11
|
-
const rest_1 = require("@octokit/rest");
|
|
12
44
|
const constants_js_1 = require("../constants.js");
|
|
13
45
|
const utils_js_1 = require("../utils/utils.js");
|
|
14
46
|
const pipe_utils_js_1 = require("../utils/pipe_utils.js");
|
|
@@ -62,7 +94,8 @@ class GitHubPipe {
|
|
|
62
94
|
return;
|
|
63
95
|
if (runParams.tests)
|
|
64
96
|
runParams.tests.forEach(t => this.addTest(t));
|
|
65
|
-
|
|
97
|
+
const { Octokit } = await Promise.resolve().then(() => __importStar(require('@octokit/rest')));
|
|
98
|
+
this.octokit = new Octokit({
|
|
66
99
|
auth: this.token,
|
|
67
100
|
});
|
|
68
101
|
const [owner, repo] = (this.repo || '').split('/');
|
|
@@ -130,7 +163,6 @@ class GitHubPipe {
|
|
|
130
163
|
if (this.tests.length > 0) {
|
|
131
164
|
body += '\n<details>\n<summary><h3>🐢 Slowest Tests</h3></summary>\n\n';
|
|
132
165
|
body += this.tests
|
|
133
|
-
// eslint-disable-next-line no-unsafe-optional-chaining
|
|
134
166
|
.sort((a, b) => b?.run_time - a?.run_time)
|
|
135
167
|
.slice(0, 5)
|
|
136
168
|
.map(t => `* ${(0, pipe_utils_js_1.fullName)(t)} (${(0, humanize_duration_1.default)(parseFloat(t.run_time))})`)
|
package/lib/pipe/gitlab.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ declare class GitLabPipe {
|
|
|
14
14
|
tests: any[];
|
|
15
15
|
token: any;
|
|
16
16
|
hiddenCommentData: string;
|
|
17
|
+
client: Gaxios;
|
|
17
18
|
prepareRun(): Promise<void>;
|
|
18
19
|
createRun(): Promise<void>;
|
|
19
20
|
addTest(test: any): void;
|
|
@@ -21,3 +22,4 @@ declare class GitLabPipe {
|
|
|
21
22
|
toString(): string;
|
|
22
23
|
updateRun(): void;
|
|
23
24
|
}
|
|
25
|
+
import { Gaxios } from 'gaxios';
|
package/lib/pipe/gitlab.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const debug_1 = __importDefault(require("debug"));
|
|
7
|
-
const
|
|
7
|
+
const gaxios_1 = require("gaxios");
|
|
8
8
|
const picocolors_1 = __importDefault(require("picocolors"));
|
|
9
9
|
const humanize_duration_1 = __importDefault(require("humanize-duration"));
|
|
10
10
|
const lodash_merge_1 = __importDefault(require("lodash.merge"));
|
|
@@ -39,6 +39,12 @@ class GitLabPipe {
|
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
this.isEnabled = true;
|
|
42
|
+
this.client = new gaxios_1.Gaxios({
|
|
43
|
+
baseURL: 'https://gitlab.com/api/v4',
|
|
44
|
+
headers: {
|
|
45
|
+
'Content-Type': 'application/json',
|
|
46
|
+
}
|
|
47
|
+
});
|
|
42
48
|
debug('GitLab Pipe: Enabled');
|
|
43
49
|
}
|
|
44
50
|
// TODO: to using SET opts as argument => prepareRun(opts)
|
|
@@ -119,7 +125,6 @@ class GitLabPipe {
|
|
|
119
125
|
if (this.tests.length > 0) {
|
|
120
126
|
body += '\n<details>\n<summary><h3>🐢 Slowest Tests</h3></summary>\n\n';
|
|
121
127
|
body += this.tests
|
|
122
|
-
// eslint-disable-next-line no-unsafe-optional-chaining
|
|
123
128
|
.sort((a, b) => b?.run_time - a?.run_time)
|
|
124
129
|
.slice(0, 5)
|
|
125
130
|
.map(t => `* ${(0, pipe_utils_js_1.fullName)(t)} (${(0, humanize_duration_1.default)(parseFloat(t.run_time))})`)
|
|
@@ -127,13 +132,18 @@ class GitLabPipe {
|
|
|
127
132
|
body += '\n</details>';
|
|
128
133
|
}
|
|
129
134
|
// eslint-disable-next-line max-len
|
|
130
|
-
const commentsRequestURL =
|
|
135
|
+
const commentsRequestURL = `/projects/${this.ENV.CI_PROJECT_ID}/merge_requests/${this.ENV.CI_MERGE_REQUEST_IID}/notes`;
|
|
131
136
|
// delete previous report
|
|
132
|
-
await deletePreviousReport(
|
|
137
|
+
await deletePreviousReport(this.client, commentsRequestURL, this.hiddenCommentData, this.token);
|
|
133
138
|
// add current report
|
|
134
139
|
debug(`Adding comment via url: ${commentsRequestURL}`);
|
|
135
140
|
try {
|
|
136
|
-
const addCommentResponse = await
|
|
141
|
+
const addCommentResponse = await this.client.request({
|
|
142
|
+
method: 'POST',
|
|
143
|
+
url: commentsRequestURL,
|
|
144
|
+
params: { access_token: this.token },
|
|
145
|
+
data: { body }
|
|
146
|
+
});
|
|
137
147
|
const commentID = addCommentResponse.data.id;
|
|
138
148
|
// eslint-disable-next-line max-len
|
|
139
149
|
const commentURL = `${this.ENV.CI_PROJECT_URL}/-/merge_requests/${this.ENV.CI_MERGE_REQUEST_IID}#note_${commentID}`;
|
|
@@ -150,13 +160,17 @@ class GitLabPipe {
|
|
|
150
160
|
}
|
|
151
161
|
updateRun() { }
|
|
152
162
|
}
|
|
153
|
-
async function deletePreviousReport(
|
|
163
|
+
async function deletePreviousReport(client, commentsRequestURL, hiddenCommentData, token) {
|
|
154
164
|
if (process.env.GITLAB_KEEP_OUTDATED_REPORTS)
|
|
155
165
|
return;
|
|
156
166
|
// get comments
|
|
157
167
|
let comments = [];
|
|
158
168
|
try {
|
|
159
|
-
const response = await
|
|
169
|
+
const response = await client.request({
|
|
170
|
+
method: 'GET',
|
|
171
|
+
url: commentsRequestURL,
|
|
172
|
+
params: { access_token: token }
|
|
173
|
+
});
|
|
160
174
|
comments = response.data;
|
|
161
175
|
}
|
|
162
176
|
catch (e) {
|
|
@@ -169,8 +183,12 @@ async function deletePreviousReport(axiosInstance, commentsRequestURL, hiddenCom
|
|
|
169
183
|
if (comment.body.includes(hiddenCommentData)) {
|
|
170
184
|
try {
|
|
171
185
|
// delete previous comment
|
|
172
|
-
const deleteCommentURL = `${commentsRequestURL}/${comment.id}
|
|
173
|
-
await
|
|
186
|
+
const deleteCommentURL = `${commentsRequestURL}/${comment.id}`;
|
|
187
|
+
await client.request({
|
|
188
|
+
method: 'DELETE',
|
|
189
|
+
url: deleteCommentURL,
|
|
190
|
+
params: { access_token: token }
|
|
191
|
+
});
|
|
174
192
|
}
|
|
175
193
|
catch (e) {
|
|
176
194
|
console.warn(`Can't delete previously added comment with testomat.io report. Ignore.`);
|
package/lib/pipe/html.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare class HtmlPipe {
|
|
|
15
15
|
templateFolderPath: string;
|
|
16
16
|
templateHtmlPath: string;
|
|
17
17
|
createRun(): Promise<void>;
|
|
18
|
+
prepareRun(): Promise<void>;
|
|
18
19
|
updateRun(): void;
|
|
19
20
|
/**
|
|
20
21
|
* Add test data to the result array for saving. As a result of this function, we get a result object to save.
|
package/lib/pipe/html.js
CHANGED
|
@@ -53,6 +53,7 @@ class HtmlPipe {
|
|
|
53
53
|
async createRun() {
|
|
54
54
|
// empty
|
|
55
55
|
}
|
|
56
|
+
async prepareRun() { }
|
|
56
57
|
updateRun() {
|
|
57
58
|
// empty
|
|
58
59
|
}
|
|
@@ -192,7 +193,6 @@ class HtmlPipe {
|
|
|
192
193
|
<option value="1">25</option>
|
|
193
194
|
<option value="2">50</option>
|
|
194
195
|
</select>`));
|
|
195
|
-
/* eslint-disable */
|
|
196
196
|
handlebars_1.default.registerHelper('emptyDataComponent', () => {
|
|
197
197
|
const svgFilePath = path_1.default.join(__dirname, '..', 'template', 'emptyData.svg');
|
|
198
198
|
const svgContent = fs_1.default.readFileSync(svgFilePath, 'utf8');
|
|
@@ -206,7 +206,6 @@ class HtmlPipe {
|
|
|
206
206
|
</div>
|
|
207
207
|
<div>`);
|
|
208
208
|
});
|
|
209
|
-
/* eslint-enable */
|
|
210
209
|
handlebars_1.default.registerHelper('pageDispleyElements', tests => {
|
|
211
210
|
// We wrapp the lines to the HTML format we need
|
|
212
211
|
const totalTests = JSON.parse(JSON.stringify(tests)
|
|
@@ -234,7 +233,6 @@ class HtmlPipe {
|
|
|
234
233
|
}
|
|
235
234
|
statuses.forEach(status => {
|
|
236
235
|
for (const option in paginationOptions) {
|
|
237
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
238
236
|
if (paginationOptions.hasOwnProperty(option)) {
|
|
239
237
|
const pageSize = paginationOptions[option];
|
|
240
238
|
let filteredItems = totalTests;
|
package/lib/pipe/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/lib/pipe/testomatio.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ declare class TestomatioPipe implements Pipe {
|
|
|
31
31
|
groupTitle: any;
|
|
32
32
|
env: string;
|
|
33
33
|
label: string;
|
|
34
|
-
|
|
34
|
+
client: Gaxios;
|
|
35
35
|
proceed: string;
|
|
36
36
|
jiraId: string;
|
|
37
37
|
runId: any;
|
|
@@ -68,3 +68,4 @@ declare class TestomatioPipe implements Pipe {
|
|
|
68
68
|
toString(): string;
|
|
69
69
|
#private;
|
|
70
70
|
}
|
|
71
|
+
import { Gaxios } from 'gaxios';
|