@alex_neo/playwright-azure-reporter 1.2.0-beta.1 → 1.3.0-beta.0

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/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "printWidth": 120,
3
+ "singleQuote": true,
4
+ "trailingComma": "es5"
5
+ }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # [1.3.0-beta.0](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.2.0-beta.2...v1.3.0-beta.0) (2022-10-31)
2
+
3
+
4
+ ### Features
5
+
6
+ * define multiple test cases for a single test ([a89847a](https://github.com/alexneo2003/playwright-azure-reporter/commit/a89847acd8a4115cfb54329b27c7941ac403a792))
7
+
8
+
9
+
10
+ # [1.2.0-beta.2](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.2.0-beta.1...v1.2.0-beta.2) (2022-10-14)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * configurationIds implementing ([9c9ad44](https://github.com/alexneo2003/playwright-azure-reporter/commit/9c9ad44b4a798e336b534f46a804e64d9c8cc31a))
16
+
17
+
18
+
1
19
  # [1.2.0-beta.1](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.2.0-beta.0...v1.2.0-beta.1) (2022-10-13)
2
20
 
3
21
 
package/README.md CHANGED
@@ -12,6 +12,13 @@ You must register an ID already existing test cases from Azure DevOps before run
12
12
 
13
13
  > **You need write testCaseId wraped in square brackets at the test name.**
14
14
 
15
+ You can define multiple test cases for a single test with next format:
16
+
17
+ - `[1] Test name` - single test case
18
+ - `[1,2,3] Test name` - multiple test cases
19
+ - `[16, 17, 18] Test name` - multiple test cases with spaces
20
+ - `[1, 2, 3] Test name [4] Test name [5][6] Test name` - with combined format
21
+
15
22
  For example:
16
23
 
17
24
  ```typescript
@@ -20,17 +27,33 @@ describe('Test suite', () => {
20
27
  expect(true).toBe(true);
21
28
  });
22
29
 
23
- test('[3] Correct test', () => {
30
+ test('Correct test [3]', () => {
24
31
  expect(true).toBe(true);
25
32
  });
26
33
 
27
- test.skip('[4] Skipped test', () => {
34
+ test.skip('Skipped test [4]', () => {
28
35
  expect(true).toBe(true);
29
36
  });
30
37
 
31
38
  test('[6] Failed test', () => {
32
39
  expect(true).toBe(false);
33
40
  });
41
+
42
+ test('[7] Test seven [8] Test eight [9] Test nine', () => {
43
+ expect(true).toBe(true);
44
+ });
45
+
46
+ test('[10,11,12] Test ten, eleven, twelve', () => {
47
+ expect(true).toBe(true);
48
+ });
49
+
50
+ test('[13, 14, 15] Test thirteen, fourteen, fifteen', () => {
51
+ expect(true).toBe(true);
52
+ });
53
+
54
+ test('[16, 17, 18] Test sixteen, seventeen, eighteen [19] Test nineteen', () => {
55
+ expect(true).toBe(true);
56
+ });
34
57
  });
35
58
  ```
36
59
 
@@ -1,9 +1,10 @@
1
1
  import * as TestInterfaces from 'azure-devops-node-api/interfaces/TestInterfaces';
2
2
  import { Reporter, TestCase, TestResult } from '@playwright/test/reporter';
3
3
  export declare function createGuid(): string;
4
+ export declare function shortID(): string;
4
5
  declare const attachmentTypesArray: readonly ["screenshot", "video", "trace"];
5
6
  declare type TAttachmentType = Array<typeof attachmentTypesArray[number]>;
6
- declare type TTestRunConfig = Omit<TestInterfaces.RunCreateModel, 'name' | 'automated' | 'plan' | 'pointIds'>;
7
+ declare type TTestRunConfig = Omit<TestInterfaces.RunCreateModel, 'name' | 'automated' | 'plan' | 'pointIds'> | undefined;
7
8
  export interface AzureReporterOptions {
8
9
  token: string;
9
10
  planId: number;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -33,57 +22,25 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
22
  __setModuleDefault(result, mod);
34
23
  return result;
35
24
  };
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
- function verb(n) { return function (v) { return step([n, v]); }; }
49
- function step(op) {
50
- if (f) throw new TypeError("Generator is already executing.");
51
- while (_) try {
52
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
53
- if (y = 0, t) op = [op[0] & 2, t.value];
54
- switch (op[0]) {
55
- case 0: case 1: t = op; break;
56
- case 4: _.label++; return { value: op[1], done: false };
57
- case 5: _.label++; y = op[1]; op = [0]; continue;
58
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
59
- default:
60
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
61
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
62
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
63
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
64
- if (t[2]) _.ops.pop();
65
- _.trys.pop(); continue;
66
- }
67
- op = body.call(thisArg, _);
68
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
69
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
- }
71
- };
72
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
73
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
74
27
  };
75
28
  Object.defineProperty(exports, "__esModule", { value: true });
76
- exports.createGuid = void 0;
29
+ exports.shortID = exports.createGuid = void 0;
77
30
  /* eslint-disable no-unused-vars */
78
31
  /* eslint-disable no-control-regex */
79
- var azdev = __importStar(require("azure-devops-node-api"));
80
- var chalk_1 = __importDefault(require("chalk"));
81
- var crypto_1 = __importDefault(require("crypto"));
82
- var fs_1 = require("fs");
32
+ const azdev = __importStar(require("azure-devops-node-api"));
33
+ const chalk_1 = __importDefault(require("chalk"));
34
+ const crypto_1 = __importDefault(require("crypto"));
35
+ const fs_1 = require("fs");
83
36
  function createGuid() {
84
37
  return crypto_1.default.randomBytes(16).toString('hex');
85
38
  }
86
39
  exports.createGuid = createGuid;
40
+ function shortID() {
41
+ return crypto_1.default.randomBytes(8).toString('hex');
42
+ }
43
+ exports.shortID = shortID;
87
44
  var AzureTestStatuses;
88
45
  (function (AzureTestStatuses) {
89
46
  AzureTestStatuses["passed"] = "Passed";
@@ -92,106 +49,68 @@ var AzureTestStatuses;
92
49
  AzureTestStatuses["timedOut"] = "Failed";
93
50
  AzureTestStatuses["interrupted"] = "Failed";
94
51
  })(AzureTestStatuses || (AzureTestStatuses = {}));
95
- var attachmentTypesArray = [
96
- 'screenshot',
97
- 'video',
98
- 'trace',
99
- ];
100
- var AzureDevOpsReporter = /** @class */ (function () {
101
- function AzureDevOpsReporter(options) {
102
- var _this = this;
103
- this.publishedResultsCount = 0;
104
- this.resultsToBePublished = [];
105
- this.planId = 0;
106
- this.logging = false;
107
- this.isDisabled = false;
108
- this.testRunTitle = '';
109
- this.uploadAttachments = false;
110
- this.token = '';
111
- this.resolveRunId = function () { };
112
- this.rejectRunId = function () { };
113
- this.testRunConfig = {};
114
- this._addReportingOverride = function (api) {
115
- /**
116
- * Override the default behavior of publishing test results to the test run.
117
- * This is necessary because Microsoft Azure API documentation at version higher than '5.0-preview.5'
118
- * has undocumented fields and they not implementing at 'azure-devops-node-api/TestApi' package.
119
- * This function is downgraded the API version to '5.0-preview.5'.
120
- * https://github.com/microsoft/azure-devops-node-api/issues/318#issuecomment-498802402
121
- */
122
- api.addTestResultsToTestRun = function (results, projectName, runId) {
123
- var _this = this;
124
- return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
125
- var routeValues, verData, url, options, res, error_1;
126
- return __generator(this, function (_a) {
127
- switch (_a.label) {
128
- case 0:
129
- routeValues = {
130
- project: projectName,
131
- runId: runId
132
- };
133
- _a.label = 1;
134
- case 1:
135
- _a.trys.push([1, 4, , 5]);
136
- return [4 /*yield*/, this.vsoClient.getVersioningData('5.0-preview.5', 'Test', '4637d869-3a76-4468-8057-0bb02aa385cf', routeValues)];
137
- case 2:
138
- verData = _a.sent();
139
- url = verData.requestUrl;
140
- options = this.createRequestOptions('application/json', verData.apiVersion);
141
- return [4 /*yield*/, this.rest.create(url, results, options)];
142
- case 3:
143
- res = _a.sent();
144
- resolve(res);
145
- return [3 /*break*/, 5];
146
- case 4:
147
- error_1 = _a.sent();
148
- reject(error_1);
149
- return [3 /*break*/, 5];
150
- case 5: return [2 /*return*/];
151
- }
152
- });
153
- }); });
154
- };
155
- return api;
156
- };
157
- this.runIdPromise = new Promise(function (resolve, reject) {
158
- _this.resolveRunId = resolve;
159
- _this.rejectRunId = reject;
160
- }).then(function (runId) {
52
+ const attachmentTypesArray = ['screenshot', 'video', 'trace'];
53
+ class AzureDevOpsReporter {
54
+ testApi;
55
+ coreApi;
56
+ publishedResultsCount = 0;
57
+ resultsToBePublished = [];
58
+ connection;
59
+ orgUrl;
60
+ projectName;
61
+ environment;
62
+ planId = 0;
63
+ logging = false;
64
+ isDisabled = false;
65
+ testRunTitle = '';
66
+ uploadAttachments = false;
67
+ attachmentsType;
68
+ token = '';
69
+ runIdPromise;
70
+ resolveRunId = () => { };
71
+ rejectRunId = () => { };
72
+ testRunConfig = {};
73
+ constructor(options) {
74
+ this.runIdPromise = new Promise((resolve, reject) => {
75
+ this.resolveRunId = resolve;
76
+ this.rejectRunId = reject;
77
+ })
78
+ .then((runId) => {
161
79
  return runId;
162
- }).catch(function (error) {
163
- _this._warning(error);
164
- _this.isDisabled = true;
80
+ })
81
+ .catch((error) => {
82
+ this._warning(error);
83
+ this.isDisabled = true;
165
84
  });
166
85
  this._validateOptions(options);
167
86
  }
168
- AzureDevOpsReporter.prototype._validateOptions = function (options) {
169
- if (options === null || options === void 0 ? void 0 : options.isDisabled) {
87
+ _validateOptions(options) {
88
+ if (options?.isDisabled) {
170
89
  this.isDisabled = true;
171
90
  return;
172
91
  }
173
- if (!(options === null || options === void 0 ? void 0 : options.orgUrl)) {
92
+ if (!options?.orgUrl) {
174
93
  this._warning("'orgUrl' is not set. Reporting is disabled.");
175
94
  this.isDisabled = true;
176
95
  return;
177
96
  }
178
- if (!(options === null || options === void 0 ? void 0 : options.projectName)) {
97
+ if (!options?.projectName) {
179
98
  this._warning("'projectName' is not set. Reporting is disabled.");
180
99
  this.isDisabled = true;
181
100
  return;
182
101
  }
183
- if (!(options === null || options === void 0 ? void 0 : options.planId)) {
102
+ if (!options?.planId) {
184
103
  this._warning("'planId' is not set. Reporting is disabled.");
185
104
  this.isDisabled = true;
186
105
  return;
187
106
  }
188
- if (!(options === null || options === void 0 ? void 0 : options.token)) {
107
+ if (!options?.token) {
189
108
  this._warning("'token' is not set. Reporting is disabled.");
190
109
  this.isDisabled = true;
191
110
  return;
192
111
  }
193
- if (options === null || options === void 0 ? void 0 : options.uploadAttachments) {
194
- if (!(options === null || options === void 0 ? void 0 : options.attachmentsType)) {
112
+ if (options?.uploadAttachments) {
113
+ if (!options?.attachmentsType) {
195
114
  this._warning("'attachmentsType' is not set. Attachments Type will be set to 'screenshot' by default.");
196
115
  this.attachmentsType = ['screenshot'];
197
116
  }
@@ -204,424 +123,326 @@ var AzureDevOpsReporter = /** @class */ (function () {
204
123
  this.planId = options.planId;
205
124
  this.logging = options.logging || false;
206
125
  this.token = options.token;
207
- this.environment = (options === null || options === void 0 ? void 0 : options.environment) || undefined;
208
- this.testRunTitle = "".concat(this.environment ? "[".concat(this.environment, "]:") : '', " ").concat((options === null || options === void 0 ? void 0 : options.testRunTitle) || 'Playwright Test Run') ||
209
- "".concat(this.environment ? "[".concat(this.environment, "]:") : '', "Test plan ").concat(this.planId);
210
- this.uploadAttachments = (options === null || options === void 0 ? void 0 : options.uploadAttachments) || false;
126
+ this.environment = options?.environment || undefined;
127
+ this.testRunTitle =
128
+ `${this.environment ? `[${this.environment}]:` : ''} ${options?.testRunTitle || 'Playwright Test Run'}` ||
129
+ `${this.environment ? `[${this.environment}]:` : ''}Test plan ${this.planId}`;
130
+ this.uploadAttachments = options?.uploadAttachments || false;
211
131
  this.connection = new azdev.WebApi(this.orgUrl, azdev.getPersonalAccessTokenHandler(this.token));
212
- this.testRunConfig = (options === null || options === void 0 ? void 0 : options.testRunConfig) || {
213
- configurationIds: [1],
214
- };
215
- };
216
- AzureDevOpsReporter.prototype.onBegin = function () {
217
- return __awaiter(this, void 0, void 0, function () {
218
- var _a, run, error_2, parsedError;
219
- return __generator(this, function (_b) {
220
- switch (_b.label) {
221
- case 0:
222
- if (this.isDisabled)
223
- return [2 /*return*/];
224
- _b.label = 1;
225
- case 1:
226
- _b.trys.push([1, 4, , 5]);
227
- _a = this;
228
- return [4 /*yield*/, this.connection.getTestApi()];
229
- case 2:
230
- _a.testApi = _b.sent();
231
- return [4 /*yield*/, this._createRun(this.testRunTitle)];
232
- case 3:
233
- run = _b.sent();
234
- if (run === null || run === void 0 ? void 0 : run.id) {
235
- this.resolveRunId(run.id);
236
- this._log(chalk_1.default.green("Using run ".concat(run.id, " to publish test results")));
237
- }
238
- else {
239
- this.isDisabled = true;
240
- this.rejectRunId('Failed to create test run. Reporting is disabled.');
241
- }
242
- return [3 /*break*/, 5];
243
- case 4:
244
- error_2 = _b.sent();
245
- this.isDisabled = true;
246
- if (error_2.message.includes('401')) {
247
- this._warning('Failed to create test run. Check your token. Reporting is disabled.');
248
- }
249
- else if (error_2.message.includes('getaddrinfo ENOTFOUND')) {
250
- this._warning('Failed to create test run. Check your orgUrl. Reporting is disabled.');
251
- }
252
- else {
253
- this._warning('Failed to create test run. Reporting is disabled.');
254
- parsedError = JSON.parse(String(error_2.message.trim()));
255
- this._warning((parsedError === null || parsedError === void 0 ? void 0 : parsedError.message) || error_2.message);
256
- }
257
- return [3 /*break*/, 5];
258
- case 5: return [2 /*return*/];
259
- }
260
- });
261
- });
262
- };
263
- AzureDevOpsReporter.prototype.onTestEnd = function (test, testResult) {
264
- return __awaiter(this, void 0, void 0, function () {
265
- var runId, error_3;
266
- return __generator(this, function (_a) {
267
- switch (_a.label) {
268
- case 0:
269
- if (this.isDisabled)
270
- return [2 /*return*/];
271
- _a.label = 1;
272
- case 1:
273
- _a.trys.push([1, 4, , 5]);
274
- return [4 /*yield*/, this.runIdPromise];
275
- case 2:
276
- runId = _a.sent();
277
- if (!runId)
278
- return [2 /*return*/];
279
- this._logTestItem(test, testResult);
280
- return [4 /*yield*/, this._publishCaseResult(test, testResult)];
281
- case 3:
282
- _a.sent();
283
- return [3 /*break*/, 5];
284
- case 4:
285
- error_3 = _a.sent();
286
- this._warning("Failed to publish test result. \n ".concat(error_3.message));
287
- return [3 /*break*/, 5];
288
- case 5: return [2 /*return*/];
289
- }
290
- });
291
- });
292
- };
293
- AzureDevOpsReporter.prototype.onEnd = function () {
294
- return __awaiter(this, void 0, void 0, function () {
295
- var runId, prevCount, _a, runUpdatedResponse, error_4;
296
- return __generator(this, function (_b) {
297
- switch (_b.label) {
298
- case 0:
299
- if (this.isDisabled)
300
- return [2 /*return*/];
301
- _b.label = 1;
302
- case 1:
303
- _b.trys.push([1, 9, , 10]);
304
- return [4 /*yield*/, this.runIdPromise];
305
- case 2:
306
- runId = _b.sent();
307
- prevCount = this.resultsToBePublished.length;
308
- _b.label = 3;
309
- case 3:
310
- if (!(this.resultsToBePublished.length > 0)) return [3 /*break*/, 5];
311
- // need wait all results to be published
312
- if (prevCount > this.resultsToBePublished.length) {
313
- this._log(chalk_1.default.gray("Waiting for all results to be published. Remaining ".concat(this.resultsToBePublished.length, " results")));
314
- prevCount--;
315
- }
316
- return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 250); })];
317
- case 4:
318
- _b.sent();
319
- return [3 /*break*/, 3];
320
- case 5:
321
- if (this.publishedResultsCount === 0 && !runId) {
322
- this._log(chalk_1.default.gray('No testcases were matched. Ensure that your tests are declared correctly.'));
323
- return [2 /*return*/];
324
- }
325
- if (!!this.testApi) return [3 /*break*/, 7];
326
- _a = this;
327
- return [4 /*yield*/, this.connection.getTestApi()];
328
- case 6:
329
- _a.testApi = _b.sent();
330
- _b.label = 7;
331
- case 7: return [4 /*yield*/, this.testApi.updateTestRun({ state: 'Completed' }, this.projectName, runId)];
332
- case 8:
333
- runUpdatedResponse = _b.sent();
334
- this._log(chalk_1.default.green("Run ".concat(runId, " - ").concat(runUpdatedResponse.state)));
335
- return [3 /*break*/, 10];
336
- case 9:
337
- error_4 = _b.sent();
338
- this._warning(chalk_1.default.red("Error on completing run ".concat(error_4)));
339
- return [3 /*break*/, 10];
340
- case 10: return [2 /*return*/];
132
+ this.testRunConfig = options?.testRunConfig || undefined;
133
+ }
134
+ async onBegin() {
135
+ if (this.isDisabled)
136
+ return;
137
+ try {
138
+ this.testApi = await this.connection.getTestApi();
139
+ const run = await this._createRun(this.testRunTitle);
140
+ if (run?.id) {
141
+ this.resolveRunId(run.id);
142
+ this._log(chalk_1.default.green(`Using run ${run.id} to publish test results`));
143
+ }
144
+ else {
145
+ this.isDisabled = true;
146
+ this.rejectRunId('Failed to create test run. Reporting is disabled.');
147
+ }
148
+ }
149
+ catch (error) {
150
+ this.isDisabled = true;
151
+ if (error.message.includes('401')) {
152
+ this._warning('Failed to create test run. Check your token. Reporting is disabled.');
153
+ }
154
+ else if (error.message.includes('getaddrinfo ENOTFOUND')) {
155
+ this._warning('Failed to create test run. Check your orgUrl. Reporting is disabled.');
156
+ }
157
+ else {
158
+ this._warning('Failed to create test run. Reporting is disabled.');
159
+ const parsedError = JSON.parse(String(error.message.trim()));
160
+ this._warning(parsedError?.message || error.message);
161
+ }
162
+ }
163
+ }
164
+ async onTestEnd(test, testResult) {
165
+ if (this.isDisabled)
166
+ return;
167
+ try {
168
+ const runId = await this.runIdPromise;
169
+ if (!runId)
170
+ return;
171
+ this._logTestItem(test, testResult);
172
+ await this._publishCaseResult(test, testResult);
173
+ }
174
+ catch (error) {
175
+ this._warning(`Failed to publish test result. \n ${error.message}`);
176
+ }
177
+ }
178
+ async onEnd() {
179
+ if (this.isDisabled)
180
+ return;
181
+ try {
182
+ const runId = await this.runIdPromise;
183
+ let prevCount = this.resultsToBePublished.length;
184
+ while (this.resultsToBePublished.length > 0) {
185
+ // need wait all results to be published
186
+ if (prevCount > this.resultsToBePublished.length) {
187
+ this._log(chalk_1.default.gray(`Waiting for all results to be published. Remaining ${this.resultsToBePublished.length} results`));
188
+ prevCount--;
341
189
  }
342
- });
343
- });
344
- };
345
- AzureDevOpsReporter.prototype.printsToStdio = function () {
190
+ await new Promise((resolve) => setTimeout(resolve, 250));
191
+ }
192
+ if (this.publishedResultsCount === 0 && !runId) {
193
+ this._log(chalk_1.default.gray('No testcases were matched. Ensure that your tests are declared correctly.'));
194
+ return;
195
+ }
196
+ if (!this.testApi)
197
+ this.testApi = await this.connection.getTestApi();
198
+ const runUpdatedResponse = await this.testApi.updateTestRun({ state: 'Completed' }, this.projectName, runId);
199
+ this._log(chalk_1.default.green(`Run ${runId} - ${runUpdatedResponse.state}`));
200
+ }
201
+ catch (error) {
202
+ this._warning(chalk_1.default.red(`Error on completing run ${error}`));
203
+ }
204
+ }
205
+ printsToStdio() {
346
206
  return true;
347
- };
348
- AzureDevOpsReporter.prototype._log = function (message) {
207
+ }
208
+ _log(message) {
349
209
  if (this.logging) {
350
- console.log(chalk_1.default.magenta("azure: ".concat(message)));
210
+ console.log(chalk_1.default.magenta(`azure: ${message}`));
351
211
  }
352
- };
353
- AzureDevOpsReporter.prototype._warning = function (message) {
354
- console.log("".concat(chalk_1.default.magenta('azure:'), " ").concat(chalk_1.default.yellow(message)));
355
- };
356
- AzureDevOpsReporter.prototype._getCaseIds = function (test) {
357
- var results = /\[([\d,]+)\]/.exec(test.title);
358
- if (results && results.length === 2)
359
- return results[1];
360
- };
361
- AzureDevOpsReporter.prototype._logTestItem = function (test, testResult) {
212
+ }
213
+ _warning(message) {
214
+ console.log(`${chalk_1.default.magenta('azure:')} ${chalk_1.default.yellow(message)}`);
215
+ }
216
+ _getCaseIds(test) {
217
+ const result = [];
218
+ const regex = new RegExp(/\[([\d,\s]+)\]/, 'gm');
219
+ const matchesAll = test.title.matchAll(regex);
220
+ const matches = [...matchesAll].map((match) => match[1]);
221
+ matches.forEach((match) => {
222
+ const ids = match.split(',').map((id) => id.trim());
223
+ result.push(...ids);
224
+ });
225
+ return result;
226
+ }
227
+ _logTestItem(test, testResult) {
362
228
  switch (testResult.status) {
363
229
  case 'passed':
364
- this._log(chalk_1.default.green("".concat(test.title, " - ").concat(testResult.status)));
230
+ this._log(chalk_1.default.green(`${test.title} - ${testResult.status}`));
365
231
  break;
366
232
  case 'failed':
367
- this._log(chalk_1.default.red("".concat(test.title, " - ").concat(testResult.status)));
233
+ this._log(chalk_1.default.red(`${test.title} - ${testResult.status}`));
368
234
  break;
369
235
  case 'timedOut':
370
- this._log(chalk_1.default.yellow("".concat(test.title, " - ").concat(testResult.status)));
236
+ this._log(chalk_1.default.yellow(`${test.title} - ${testResult.status}`));
371
237
  break;
372
238
  case 'skipped':
373
- this._log(chalk_1.default.yellow("".concat(test.title, " - ").concat(testResult.status)));
239
+ this._log(chalk_1.default.yellow(`${test.title} - ${testResult.status}`));
374
240
  break;
375
241
  case 'interrupted':
376
- this._log(chalk_1.default.red("".concat(test.title, " - ").concat(testResult.status)));
242
+ this._log(chalk_1.default.red(`${test.title} - ${testResult.status}`));
377
243
  break;
378
244
  default:
379
- this._log("".concat(test.title, " - ").concat(testResult.status));
245
+ this._log(`${test.title} - ${testResult.status}`);
380
246
  break;
381
247
  }
382
- };
383
- AzureDevOpsReporter.prototype._createRun = function (runName) {
384
- return __awaiter(this, void 0, void 0, function () {
385
- var isExists, runModel, _a, adTestRun, error_5;
386
- return __generator(this, function (_b) {
387
- switch (_b.label) {
388
- case 0:
389
- _b.trys.push([0, 7, , 8]);
390
- return [4 /*yield*/, this._checkProject(this.projectName)];
391
- case 1:
392
- isExists = _b.sent();
393
- if (!!isExists) return [3 /*break*/, 2];
394
- return [2 /*return*/];
395
- case 2:
396
- runModel = __assign({ name: runName, automated: true, plan: { id: String(this.planId) } }, this.testRunConfig);
397
- if (!!this.testApi) return [3 /*break*/, 4];
398
- _a = this;
399
- return [4 /*yield*/, this.connection.getTestApi()];
400
- case 3:
401
- _a.testApi = _b.sent();
402
- _b.label = 4;
403
- case 4: return [4 /*yield*/, this.testApi.createTestRun(runModel, this.projectName)];
404
- case 5:
405
- adTestRun = _b.sent();
406
- if (adTestRun === null || adTestRun === void 0 ? void 0 : adTestRun.id)
407
- return [2 /*return*/, adTestRun];
408
- else
409
- throw new Error('Failed to create test run');
410
- _b.label = 6;
411
- case 6: return [3 /*break*/, 8];
412
- case 7:
413
- error_5 = _b.sent();
414
- this._warning(chalk_1.default.red(error_5.message));
415
- this.isDisabled = true;
416
- return [3 /*break*/, 8];
417
- case 8: return [2 /*return*/];
418
- }
419
- });
420
- });
421
- };
422
- AzureDevOpsReporter.prototype._removePublished = function (testAlias) {
423
- var resultIndex = this.resultsToBePublished.indexOf(testAlias);
248
+ }
249
+ async _createRun(runName) {
250
+ try {
251
+ const isExists = await this._checkProject(this.projectName);
252
+ if (!isExists) {
253
+ return;
254
+ }
255
+ else {
256
+ const runModel = {
257
+ name: runName,
258
+ automated: true,
259
+ plan: { id: String(this.planId) },
260
+ ...(this.testRunConfig
261
+ ? this.testRunConfig
262
+ : {
263
+ configurationIds: [1],
264
+ }),
265
+ };
266
+ if (!this.testApi)
267
+ this.testApi = await this.connection.getTestApi();
268
+ const adTestRun = await this.testApi.createTestRun(runModel, this.projectName);
269
+ if (adTestRun?.id)
270
+ return adTestRun;
271
+ else
272
+ throw new Error('Failed to create test run');
273
+ }
274
+ }
275
+ catch (error) {
276
+ this._warning(chalk_1.default.red(error.message));
277
+ this.isDisabled = true;
278
+ }
279
+ }
280
+ _removePublished(testAlias) {
281
+ const resultIndex = this.resultsToBePublished.indexOf(testAlias);
424
282
  if (resultIndex !== -1)
425
283
  this.resultsToBePublished.splice(resultIndex, 1);
426
- };
427
- AzureDevOpsReporter.prototype._checkProject = function (projectName) {
428
- return __awaiter(this, void 0, void 0, function () {
429
- var _a, project, error_6;
430
- return __generator(this, function (_b) {
431
- switch (_b.label) {
432
- case 0:
433
- _b.trys.push([0, 4, , 5]);
434
- if (!!this.coreApi) return [3 /*break*/, 2];
435
- _a = this;
436
- return [4 /*yield*/, this.connection.getCoreApi()];
437
- case 1:
438
- _a.coreApi = _b.sent();
439
- _b.label = 2;
440
- case 2: return [4 /*yield*/, this.coreApi.getProject(projectName)];
441
- case 3:
442
- project = _b.sent();
443
- if (project)
444
- return [2 /*return*/, project];
445
- else
446
- throw new Error("Project ".concat(projectName, " does not exist. Reporting is disabled."));
447
- return [3 /*break*/, 5];
448
- case 4:
449
- error_6 = _b.sent();
450
- this._warning(chalk_1.default.red(error_6.message));
451
- this.isDisabled = true;
452
- return [3 /*break*/, 5];
453
- case 5: return [2 /*return*/];
284
+ }
285
+ async _checkProject(projectName) {
286
+ try {
287
+ if (!this.coreApi)
288
+ this.coreApi = await this.connection.getCoreApi();
289
+ const project = await this.coreApi.getProject(projectName);
290
+ if (project)
291
+ return project;
292
+ else
293
+ throw new Error(`Project ${projectName} does not exist. Reporting is disabled.`);
294
+ }
295
+ catch (error) {
296
+ this._warning(chalk_1.default.red(error.message));
297
+ this.isDisabled = true;
298
+ }
299
+ }
300
+ async _getTestPointIdsByTCIds(planId, testcaseIds) {
301
+ const result = {};
302
+ try {
303
+ const pointsQuery = {
304
+ pointsFilter: { testcaseIds },
305
+ };
306
+ if (!this.testApi)
307
+ this.testApi = await this.connection.getTestApi();
308
+ const pointsQueryResult = await this.testApi.getPointsByQuery(pointsQuery, this.projectName);
309
+ if (pointsQueryResult.points) {
310
+ const findedPointWithConfiguration = pointsQueryResult.points.find((point) => point.testPlan &&
311
+ point.testPlan.id &&
312
+ parseInt(point.testPlan.id, 10) === planId &&
313
+ (this.testRunConfig?.configurationIds?.length
314
+ ? this.testRunConfig.configurationIds.includes(Number(point.configuration.id))
315
+ : false));
316
+ if (findedPointWithConfiguration) {
317
+ result.point = findedPointWithConfiguration.id;
318
+ result.configurationId = findedPointWithConfiguration.configuration.id;
319
+ result.configurationName = findedPointWithConfiguration.configuration.name;
454
320
  }
455
- });
456
- });
457
- };
458
- AzureDevOpsReporter.prototype._getTestPointIdsByTCIds = function (planId, testcaseIds) {
459
- return __awaiter(this, void 0, void 0, function () {
460
- var pointsIds, pointsQuery, _a, pointsQueryResult, error_7;
461
- return __generator(this, function (_b) {
462
- switch (_b.label) {
463
- case 0:
464
- pointsIds = [];
465
- _b.label = 1;
466
- case 1:
467
- _b.trys.push([1, 5, , 6]);
468
- pointsQuery = {
469
- pointsFilter: { testcaseIds: testcaseIds }
470
- };
471
- if (!!this.testApi) return [3 /*break*/, 3];
472
- _a = this;
473
- return [4 /*yield*/, this.connection.getTestApi()];
474
- case 2:
475
- _a.testApi = _b.sent();
476
- _b.label = 3;
477
- case 3: return [4 /*yield*/, this.testApi.getPointsByQuery(pointsQuery, this.projectName)];
478
- case 4:
479
- pointsQueryResult = _b.sent();
480
- if (pointsQueryResult.points) {
481
- pointsQueryResult.points.forEach(function (point) {
482
- if (point.testPlan && point.testPlan.id && parseInt(point.testPlan.id, 10) === planId) {
483
- pointsIds.push(point.id);
484
- }
485
- });
486
- }
487
- if (pointsIds.length === 0) {
488
- throw new Error("Could not find test point for test cases [".concat(testcaseIds.join(','), "] associated with test plan ").concat(this.planId, ". Check, maybe testPlanId, what you specified, is incorrect."));
489
- }
490
- return [2 /*return*/, pointsIds];
491
- case 5:
492
- error_7 = _b.sent();
493
- this._warning(chalk_1.default.red(error_7.message));
494
- return [3 /*break*/, 6];
495
- case 6: return [2 /*return*/, pointsIds];
321
+ else {
322
+ const findedPoint = pointsQueryResult.points.find((point) => point.testPlan && point.testPlan.id && parseInt(point.testPlan.id, 10) === planId);
323
+ if (findedPoint) {
324
+ result.point = findedPoint.id;
325
+ }
326
+ }
327
+ }
328
+ if (!result?.point) {
329
+ throw new Error(`Could not find test point for test cases [${testcaseIds.join(',')}] associated with test plan ${this.planId}. Check, maybe testPlanId, what you specified, is incorrect.`);
330
+ }
331
+ }
332
+ catch (error) {
333
+ this._warning(chalk_1.default.red(error.message));
334
+ }
335
+ return result;
336
+ }
337
+ _addReportingOverride = (api) => {
338
+ /**
339
+ * Override the default behavior of publishing test results to the test run.
340
+ * This is necessary because Microsoft Azure API documentation at version higher than '5.0-preview.5'
341
+ * has undocumented fields and they not implementing at 'azure-devops-node-api/TestApi' package.
342
+ * This function is downgraded the API version to '5.0-preview.5'.
343
+ * https://github.com/microsoft/azure-devops-node-api/issues/318#issuecomment-498802402
344
+ */
345
+ api.addTestResultsToTestRun = function (results, projectName, runId) {
346
+ return new Promise(async (resolve, reject) => {
347
+ const routeValues = {
348
+ project: projectName,
349
+ runId,
350
+ };
351
+ try {
352
+ const verData = await this.vsoClient.getVersioningData('5.0-preview.5', 'Test', '4637d869-3a76-4468-8057-0bb02aa385cf', routeValues);
353
+ const url = verData.requestUrl;
354
+ const options = this.createRequestOptions('application/json', verData.apiVersion);
355
+ const res = await this.rest.create(url, results, options);
356
+ resolve(res);
357
+ }
358
+ catch (error) {
359
+ reject(error);
496
360
  }
497
361
  });
498
- });
362
+ };
363
+ return api;
499
364
  };
500
- AzureDevOpsReporter.prototype._uploadAttachmentsFunc = function (testResult, caseId, testCaseId) {
501
- return __awaiter(this, void 0, void 0, function () {
502
- var runId, attachmentsResult, _i, _a, attachment, attachments, _b, response, error_8;
503
- return __generator(this, function (_c) {
504
- switch (_c.label) {
505
- case 0:
506
- this._log(chalk_1.default.gray("Start upload attachments for test case [".concat(testCaseId, "]")));
507
- return [4 /*yield*/, this.runIdPromise];
508
- case 1:
509
- runId = _c.sent();
510
- attachmentsResult = [];
511
- _i = 0, _a = testResult.attachments;
512
- _c.label = 2;
513
- case 2:
514
- if (!(_i < _a.length)) return [3 /*break*/, 11];
515
- attachment = _a[_i];
516
- _c.label = 3;
517
- case 3:
518
- _c.trys.push([3, 9, , 10]);
519
- if (!this.attachmentsType.includes(attachment.name)) return [3 /*break*/, 8];
520
- if (!(0, fs_1.existsSync)(attachment.path)) return [3 /*break*/, 7];
521
- attachments = {
365
+ async _uploadAttachmentsFunc(testResult, caseId, testCaseId) {
366
+ this._log(chalk_1.default.gray(`Start upload attachments for test case [${testCaseId}]`));
367
+ const runId = await this.runIdPromise;
368
+ const attachmentsResult = [];
369
+ for (const attachment of testResult.attachments) {
370
+ try {
371
+ if (this.attachmentsType.includes(attachment.name)) {
372
+ if ((0, fs_1.existsSync)(attachment.path)) {
373
+ const attachments = {
522
374
  attachmentType: 'GeneralAttachment',
523
- fileName: "".concat(attachment.name, "-").concat(createGuid(), ".").concat(attachment.contentType.split('/')[1]),
524
- stream: (0, fs_1.readFileSync)(attachment.path, { encoding: 'base64' })
375
+ fileName: `${attachment.name}-${createGuid()}.${attachment.contentType.split('/')[1]}`,
376
+ stream: (0, fs_1.readFileSync)(attachment.path, { encoding: 'base64' }),
525
377
  };
526
- if (!!this.testApi) return [3 /*break*/, 5];
527
- _b = this;
528
- return [4 /*yield*/, this.connection.getTestApi()];
529
- case 4:
530
- _b.testApi = _c.sent();
531
- _c.label = 5;
532
- case 5: return [4 /*yield*/, this.testApi.createTestResultAttachment(attachments, this.projectName, runId, caseId)];
533
- case 6:
534
- response = _c.sent();
535
- if (!(response === null || response === void 0 ? void 0 : response.id))
536
- throw new Error("Failed to upload attachment for test case [".concat(testCaseId, "]"));
378
+ if (!this.testApi)
379
+ this.testApi = await this.connection.getTestApi();
380
+ const response = await this.testApi.createTestResultAttachment(attachments, this.projectName, runId, caseId);
381
+ if (!response?.id)
382
+ throw new Error(`Failed to upload attachment for test case [${testCaseId}]`);
537
383
  attachmentsResult.push(response.url);
538
- return [3 /*break*/, 8];
539
- case 7: throw new Error("Attachment ".concat(attachment.path, " does not exist"));
540
- case 8: return [3 /*break*/, 10];
541
- case 9:
542
- error_8 = _c.sent();
543
- this._log(chalk_1.default.red(error_8.message));
544
- return [3 /*break*/, 10];
545
- case 10:
546
- _i++;
547
- return [3 /*break*/, 2];
548
- case 11: return [2 /*return*/, attachmentsResult];
384
+ }
385
+ else {
386
+ throw new Error(`Attachment ${attachment.path} does not exist`);
387
+ }
549
388
  }
550
- });
551
- });
552
- };
553
- AzureDevOpsReporter.prototype._publishCaseResult = function (test, testResult) {
554
- var _a, _b, _c, _d;
555
- return __awaiter(this, void 0, void 0, function () {
556
- var caseId, testAlias, runId, pointIds, results, _e, testCaseResult, error_9;
557
- return __generator(this, function (_f) {
558
- switch (_f.label) {
559
- case 0:
560
- caseId = this._getCaseIds(test);
561
- if (!caseId)
562
- return [2 /*return*/];
563
- testAlias = "".concat(caseId, " - ").concat(test.title);
564
- this.resultsToBePublished.push(testAlias);
565
- _f.label = 1;
566
- case 1:
567
- _f.trys.push([1, 9, , 10]);
568
- return [4 /*yield*/, this.runIdPromise];
569
- case 2:
570
- runId = _f.sent();
571
- this._log(chalk_1.default.gray("Start publishing: ".concat(test.title)));
572
- return [4 /*yield*/, this._getTestPointIdsByTCIds(this.planId, [parseInt(caseId, 10)])];
573
- case 3:
574
- pointIds = _f.sent();
575
- if (!pointIds || !pointIds.length) {
576
- this._removePublished(testAlias);
577
- throw new Error("No test points found for test case [".concat(caseId, "]"));
578
- }
579
- results = [
580
- {
581
- testCase: { id: caseId },
582
- testPoint: { id: String(pointIds[0]) },
583
- testCaseTitle: test.title,
584
- outcome: AzureTestStatuses[testResult.status],
585
- state: 'Completed',
586
- durationInMs: testResult.duration,
587
- errorMessage: testResult.error
588
- ? "".concat(test.title, ": ").concat((_b = (_a = testResult.error) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.replace(/\u001b\[.*?m/g, ''))
589
- : undefined,
590
- stackTrace: (_d = (_c = testResult.error) === null || _c === void 0 ? void 0 : _c.stack) === null || _d === void 0 ? void 0 : _d.replace(/\u001b\[.*?m/g, '')
591
- }
592
- ];
593
- if (!!this.testApi) return [3 /*break*/, 5];
594
- _e = this;
595
- return [4 /*yield*/, this.connection.getTestApi()];
596
- case 4:
597
- _e.testApi = _f.sent();
598
- _f.label = 5;
599
- case 5: return [4 /*yield*/, this._addReportingOverride(this.testApi).addTestResultsToTestRun(results, this.projectName, runId)];
600
- case 6:
601
- testCaseResult = _f.sent();
602
- if (!(testCaseResult === null || testCaseResult === void 0 ? void 0 : testCaseResult.result))
603
- throw new Error("Failed to publish test result for test case [".concat(caseId, "]"));
604
- if (!(this.uploadAttachments && testResult.attachments.length > 0)) return [3 /*break*/, 8];
605
- return [4 /*yield*/, this._uploadAttachmentsFunc(testResult, testCaseResult.result.value[0].id, caseId)];
606
- case 7:
607
- _f.sent();
608
- _f.label = 8;
609
- case 8:
610
- this._removePublished(testAlias);
611
- this.publishedResultsCount++;
612
- this._log(chalk_1.default.gray("Result published: ".concat(test.title)));
613
- return [2 /*return*/, testCaseResult];
614
- case 9:
615
- error_9 = _f.sent();
616
- this._removePublished(testAlias);
617
- this._warning(chalk_1.default.red(error_9.message));
618
- return [3 /*break*/, 10];
619
- case 10: return [2 /*return*/];
389
+ }
390
+ catch (error) {
391
+ this._log(chalk_1.default.red(error.message));
392
+ }
393
+ }
394
+ return attachmentsResult;
395
+ }
396
+ async _publishCaseResult(test, testResult) {
397
+ const caseIds = this._getCaseIds(test);
398
+ if (!caseIds || !caseIds.length)
399
+ return;
400
+ await Promise.all(caseIds.map(async (caseId) => {
401
+ const testAlias = `${shortID()} - ${test.title}`;
402
+ this.resultsToBePublished.push(testAlias);
403
+ try {
404
+ const runId = await this.runIdPromise;
405
+ this._log(chalk_1.default.gray(`Start publishing: TC:${caseId} - ${test.title}`));
406
+ const points = await this._getTestPointIdsByTCIds(this.planId, [parseInt(caseId, 10)]);
407
+ if (!points.point) {
408
+ this._removePublished(testAlias);
409
+ throw new Error(`No test points found for test case [${caseIds}]`);
620
410
  }
621
- });
622
- });
623
- };
624
- return AzureDevOpsReporter;
625
- }());
411
+ const results = [
412
+ {
413
+ testCase: { id: caseId },
414
+ testPoint: { id: String(points.point) },
415
+ testCaseTitle: test.title,
416
+ outcome: AzureTestStatuses[testResult.status],
417
+ state: 'Completed',
418
+ durationInMs: testResult.duration,
419
+ errorMessage: testResult.error
420
+ ? `${test.title}: ${testResult.error?.message?.replace(/\u001b\[.*?m/g, '')}`
421
+ : undefined,
422
+ stackTrace: testResult.error?.stack?.replace(/\u001b\[.*?m/g, ''),
423
+ ...(points.configurationId && {
424
+ configuration: { id: points.configurationId, name: points.configurationName },
425
+ }),
426
+ },
427
+ ];
428
+ if (!this.testApi)
429
+ this.testApi = await this.connection.getTestApi();
430
+ const testCaseResult = (await this._addReportingOverride(this.testApi).addTestResultsToTestRun(results, this.projectName, runId));
431
+ if (!testCaseResult?.result)
432
+ throw new Error(`Failed to publish test result for test case [${caseId}]`);
433
+ if (this.uploadAttachments && testResult.attachments.length > 0)
434
+ await this._uploadAttachmentsFunc(testResult, testCaseResult.result.value[0].id, caseId);
435
+ this._removePublished(testAlias);
436
+ this.publishedResultsCount++;
437
+ this._log(chalk_1.default.gray(`Result published: TC:${caseId} - ${test.title}`));
438
+ return testCaseResult;
439
+ }
440
+ catch (error) {
441
+ this._removePublished(testAlias);
442
+ this._warning(chalk_1.default.red(error.message));
443
+ }
444
+ }));
445
+ }
446
+ }
626
447
  exports.default = AzureDevOpsReporter;
627
448
  //# sourceMappingURL=playwright-azure-reporter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"playwright-azure-reporter.js","sourceRoot":"","sources":["../src/playwright-azure-reporter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAmC;AACnC,qCAAqC;AACrC,2DAA8C;AAU9C,gDAAyB;AACzB,kDAA2B;AAC3B,yBAA6C;AAE7C,SAAgB,UAAU;IACxB,OAAO,gBAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC;AAED,IAAK,iBAMJ;AAND,WAAK,iBAAiB;IACpB,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;IACjB,uCAAkB,CAAA;IAClB,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;AACxB,CAAC,EANI,iBAAiB,KAAjB,iBAAiB,QAMrB;AAED,IAAM,oBAAoB,GAAG;IAC3B,YAAY;IACZ,OAAO;IACP,OAAO;CACC,CAAC;AAuEX;IAqBE,6BAAmB,OAA6B;QAAhD,iBAWC;QA7BO,0BAAqB,GAAG,CAAC,CAAC;QAC1B,yBAAoB,GAAa,EAAE,CAAC;QAKpC,WAAM,GAAG,CAAC,CAAC;QACX,YAAO,GAAG,KAAK,CAAC;QAChB,eAAU,GAAG,KAAK,CAAC;QACnB,iBAAY,GAAG,EAAE,CAAC;QAClB,sBAAiB,GAAG,KAAK,CAAC;QAE1B,UAAK,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AO;oBAAE,IAAI,CAAC,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;gBACrE,MAAM,cAAc,GAAyB,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAC5E,IAAI,CAAC,OAAO,CACb,CAAC,uBAAuB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,KAAM,CAAC,CAAoC,CAAC;gBACjG,IAAI,CAAC,cAAc,EAAE,MAAM;oBAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,MAAM,GAAG,CAAC,CAAC;gBAExG,IAAI,IAAI,CAAC,iBAAiB,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;oBAC7D,MAAM,IAAI,CAAC,sBAAsB,CAAC,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,KAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;gBAE5F,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;gBACjC,IAAI,CAAC,qBAAqB,EAAE,CAAC;gBAC7B,IAAI,CAAC,IAAI,CAAC,eAAK,CAAC,IAAI,CAAC,wBAAwB,MAAM,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACxE,OAAO,cAAc,CAAC;aACvB;YAAC,OAAO,KAAU,EAAE;gBACnB,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;gBACjC,IAAI,CAAC,QAAQ,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alex_neo/playwright-azure-reporter",
3
- "version": "1.2.0-beta.1",
3
+ "version": "1.3.0-beta.0",
4
4
  "description": "Playwright Azure Reporter",
5
5
  "main": "./dist/playwright-azure-reporter.js",
6
6
  "types": "./dist/playwright-azure-reporter.d.js",
@@ -1,6 +1,6 @@
1
- import { PlaywrightTestConfig } from '@playwright/test'
2
- import azureConfig from './azure.config.json'
3
- import { AzureReporterOptions } from './src/playwright-azure-reporter'
1
+ import { PlaywrightTestConfig } from '@playwright/test';
2
+ import azureConfig from './azure.config.json';
3
+ import { AzureReporterOptions } from './src/playwright-azure-reporter';
4
4
 
5
5
  /**
6
6
  * See https://playwright.dev/docs/test-configuration.
@@ -9,7 +9,7 @@ const config: PlaywrightTestConfig = {
9
9
  testDir: './tests',
10
10
  timeout: 30 * 1000,
11
11
  expect: {
12
- timeout: 5000
12
+ timeout: 5000,
13
13
  },
14
14
  forbidOnly: !!process.env.CI,
15
15
  retries: process.env.CI ? 2 : 0,
@@ -29,19 +29,20 @@ const config: PlaywrightTestConfig = {
29
29
  logging: true,
30
30
  attachmentsType: ['screenshot'],
31
31
  testRunConfig: {
32
+ configurationIds: [1],
32
33
  owner: {
33
34
  displayName: 'Alex Neo',
34
35
  },
35
36
  comment: 'Playwright Test Run',
36
- }
37
- } as AzureReporterOptions
38
- ]
37
+ },
38
+ } as AzureReporterOptions,
39
+ ],
39
40
  ],
40
41
  use: {
41
42
  screenshot: 'only-on-failure',
42
43
  actionTimeout: 0,
43
- trace: 'on-first-retry'
44
- }
45
- }
44
+ trace: 'on-first-retry',
45
+ },
46
+ };
46
47
 
47
- export default config
48
+ export default config;
@@ -1,20 +1,32 @@
1
- import { expect, test } from '@playwright/test'
1
+ import { expect, test } from '@playwright/test';
2
2
 
3
3
  test.beforeEach(async ({ page }) => {
4
- await page.goto('https://playwright.dev/')
5
- })
4
+ await page.goto('https://playwright.dev/');
5
+ });
6
6
 
7
7
  test.describe('Describe', () => {
8
8
  test('[3] Should page opened', async ({ page }) => {
9
- await page.locator('text=Get started').click()
10
- await expect(page).toHaveTitle(/Getting started/)
11
- })
9
+ await page.locator('text=Get started').click();
10
+ await expect(page).toHaveTitle(/Getting started/);
11
+ });
12
12
  test('[7] Should page closed', async ({ page }) => {
13
- await page.locator('text=Get started').click()
14
- await expect(page).toHaveTitle(/Getting started/)
15
- })
13
+ await page.locator('text=Get started').click();
14
+ await expect(page).toHaveTitle(/Getting started/);
15
+ });
16
16
  test('[8] Awaiting for user input', async ({ page }) => {
17
- await page.locator('text=Get started').click()
18
- await expect(page).toHaveTitle(/Getting started/)
19
- })
20
- })
17
+ await page.locator('text=Get started').click();
18
+ await expect(page).toHaveTitle(/Getting started/);
19
+ });
20
+ test('[3] [7] [8] Awaiting for user input', async ({ page }) => {
21
+ await page.locator('text=Get started').click();
22
+ await expect(page).toHaveTitle(/Getting started/);
23
+ });
24
+ test('[3,7,8] Awaiting for user input', async ({ page }) => {
25
+ await page.locator('text=Get started').click();
26
+ await expect(page).toHaveTitle(/Getting started/);
27
+ });
28
+ test('[3, 7, 8] Awaiting for user input', async ({ page }) => {
29
+ await page.locator('text=Get started').click();
30
+ await expect(page).toHaveTitle(/Getting started/);
31
+ });
32
+ });
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  /* Basic Options */
4
- "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
4
+ "target": "ES2022", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
5
5
  "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6
6
  "lib": ["es2020", "dom"], /* Specify library files to be included in the compilation. */
7
7
  "declaration": true, /* Generates corresponding '.d.ts' file. */