@empiricalrun/playwright-utils 0.28.7 → 0.28.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @empiricalrun/playwright-utils
2
2
 
3
+ ## 0.28.8
4
+
5
+ ### Patch Changes
6
+
7
+ - a085efd: chore: remove custom reporter for playwright 1.47
8
+ - 7077c69: fix: empirical-reporter video url array bug
9
+ - Updated dependencies [8ff49e5]
10
+ - Updated dependencies [bc38c65]
11
+ - Updated dependencies [a45714d]
12
+ - Updated dependencies [e5e45e0]
13
+ - Updated dependencies [ba65440]
14
+ - Updated dependencies [cf991ee]
15
+ - Updated dependencies [44373a4]
16
+ - Updated dependencies [8a206cf]
17
+ - Updated dependencies [eda0ccd]
18
+ - Updated dependencies [151dc8f]
19
+ - Updated dependencies [49b44a6]
20
+ - Updated dependencies [25bd9b6]
21
+ - Updated dependencies [1f7e8b0]
22
+ - Updated dependencies [42e19ee]
23
+ - Updated dependencies [82a6fe7]
24
+ - Updated dependencies [f9a7023]
25
+ - Updated dependencies [d56954c]
26
+ - Updated dependencies [02c3532]
27
+ - Updated dependencies [8f3a25f]
28
+ - Updated dependencies [bd61b13]
29
+ - Updated dependencies [a25735a]
30
+ - @empiricalrun/llm@0.23.0
31
+ - @empiricalrun/test-gen@0.77.0
32
+
3
33
  ## 0.28.7
4
34
 
5
35
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAczD,wBAAgB,gBAAgB,IAAI,MAAM,CAazC;AA2CD,eAAO,MAAM,UAAU,EAAE,oBA0BxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,iBAarB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAczD,wBAAgB,gBAAgB,IAAI,MAAM,CAazC;AAwCD,eAAO,MAAM,UAAU,EAAE,oBA0BxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,iBAarB,CAAC"}
@@ -53,13 +53,8 @@ function isPlaywrightV147() {
53
53
  return version && version.includes("1.47") ? true : false;
54
54
  }
55
55
  function getReporters() {
56
- // TODO: Remove this once we have migrated to 1.53.X for all repos
57
56
  if (isPlaywrightV147()) {
58
- return [
59
- ["list"],
60
- ["json", { outputFile: "playwright-report/summary.json" }],
61
- ["./node_modules/@empiricalrun/playwright-utils/dist/reporter/custom.js"],
62
- ];
57
+ throw new Error("Please upgrade to Playwright version 1.53.X or above to use the latest reporters");
63
58
  }
64
59
  return [
65
60
  ["list"],
@@ -1 +1 @@
1
- {"version":3,"file":"playwright-extensions.d.ts","sourceRoot":"","sources":["../src/playwright-extensions.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7C,CAAC;AAEF,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,OAAQ,SAAQ,eAAe;KAAG;CAC7C;AAED,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,OAAQ,SAAQ,eAAe;KAAG;CAC7C"}
1
+ {"version":3,"file":"playwright-extensions.d.ts","sourceRoot":"","sources":["../src/playwright-extensions.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7C,CAAC;AAEF,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,OAAQ,SAAQ,eAAe;KAAG;CAC7C;AAED,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,OAAQ,SAAQ,eAAe;KAAG;CAC7C"}
@@ -9,7 +9,7 @@ declare class EmpiricalReporter implements Reporter {
9
9
  private _urlPrefix;
10
10
  private checkR2Creds;
11
11
  constructor();
12
- private processTestAttachment;
12
+ private enqueTestAttachmentUploadTask;
13
13
  onTestEnd(test: TestCase, result: TestResult): void;
14
14
  onEnd(result: FullResult): Promise<void>;
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"empirical-reporter.d.ts","sourceRoot":"","sources":["../../src/reporter/empirical-reporter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACX,MAAM,2BAA2B,CAAC;AAiBnC,cAAM,iBAAkB,YAAW,QAAQ;IACzC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,kBAAkB,CAAyB;IACnD,OAAO,CAAC,oBAAoB,CAAkB;IAC9C,OAAO,CAAC,oBAAoB,CAG1B;IACF,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,UAAU,CAA2F;IAE7G,OAAO,CAAC,YAAY;;IAyBpB,OAAO,CAAC,qBAAqB,CAuB3B;IAEF,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU;IAyEtC,KAAK,CAAC,MAAM,EAAE,UAAU;CA+G/B;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"empirical-reporter.d.ts","sourceRoot":"","sources":["../../src/reporter/empirical-reporter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACX,MAAM,2BAA2B,CAAC;AAiBnC,cAAM,iBAAkB,YAAW,QAAQ;IACzC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,kBAAkB,CAAyB;IACnD,OAAO,CAAC,oBAAoB,CAAkB;IAC9C,OAAO,CAAC,oBAAoB,CAG1B;IACF,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,UAAU,CACwE;IAE1F,OAAO,CAAC,YAAY;;IAyBpB,OAAO,CAAC,6BAA6B,CAuBnC;IAEF,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU;IA+EtC,KAAK,CAAC,MAAM,EAAE,UAAU;CA+G/B;AAED,eAAe,iBAAiB,CAAC"}
@@ -36,7 +36,7 @@ class EmpiricalReporter {
36
36
  this._destinationDir = path_1.default.join(process.env.PROJECT_NAME, process.env.TEST_RUN_GITHUB_ACTION_ID);
37
37
  this._willUploadArtifacts = this.checkR2Creds();
38
38
  }
39
- processTestAttachment = async (attachment) => {
39
+ enqueTestAttachmentUploadTask = async (attachment) => {
40
40
  if (!attachment.path)
41
41
  return;
42
42
  const exists = await (0, util_1.checkFileExistsAsync)(attachment.path);
@@ -66,7 +66,10 @@ class EmpiricalReporter {
66
66
  }
67
67
  try {
68
68
  const attachmentPromises = result.attachments.map((attachment) => {
69
- return this.processTestAttachment(attachment);
69
+ return this.enqueTestAttachmentUploadTask(attachment).then((fileMap) => ({
70
+ fileMap,
71
+ originalAttachment: attachment,
72
+ }));
70
73
  });
71
74
  const testCaseRunEventTask = async () => {
72
75
  return Promise.all(attachmentPromises)
@@ -85,19 +88,20 @@ class EmpiricalReporter {
85
88
  projectName,
86
89
  runId: process.env.TEST_RUN_GITHUB_ACTION_ID || "",
87
90
  };
88
- uploadedAttachments.forEach((attachment) => {
89
- if (attachment) {
90
- Object.entries(attachment).forEach(([key, value]) => {
91
- if (key.includes("video")) {
91
+ uploadedAttachments.forEach((item) => {
92
+ if (item.fileMap && item.originalAttachment) {
93
+ const { fileMap, originalAttachment } = item;
94
+ Object.entries(fileMap).forEach(([key, value]) => {
95
+ if (originalAttachment.contentType.startsWith("video/")) {
92
96
  params.assetsURL.videos.push({
93
97
  name: `test-${test.id}-slug-${(0, crypto_1.randomUUID)()}`,
94
98
  url: value,
95
99
  });
96
100
  }
97
- if (key.includes("trace")) {
101
+ if (originalAttachment.name.includes("trace")) {
98
102
  params.assetsURL.trace = value;
99
103
  }
100
- if (key.includes("error-context")) {
104
+ if (originalAttachment.name.includes("error-context")) {
101
105
  params.assetsURL.errorContext = value;
102
106
  }
103
107
  });
@@ -1,22 +1,5 @@
1
- /**
2
- * Original file: https://github.com/microsoft/playwright/blob/cf8c14f884b6f24966350a5f49b1580c3e183d21/packages/playwright/src/util.ts
3
- * Copyright (c) Microsoft Corporation.
4
- * Modifications copyright (c) Forge AI Private Limited
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
1
  import { GenericPlaywrightAttachment } from "@empiricalrun/shared-types";
19
- import { JSONReport as PlaywrightJSONReport, JSONReportSpec, TestCase } from "@playwright/test/reporter";
2
+ import { JSONReportSpec, JSONReport as PlaywrightJSONReport, TestCase } from "@playwright/test/reporter";
20
3
  import { TestCaseRunEndEvent } from "./types";
21
4
  export declare function getPackageJsonPath(folderPath: string): string;
22
5
  export declare function resolveReporterOutputPath(defaultValue: string, configDir: string, configValue: string | undefined): string;
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/reporter/util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BA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,gCAAgC,CACpD,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,6CAoClB"}
@@ -1,21 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * Original file: https://github.com/microsoft/playwright/blob/cf8c14f884b6f24966350a5f49b1580c3e183d21/packages/playwright/src/util.ts
4
- * Copyright (c) Microsoft Corporation.
5
- * Modifications copyright (c) Forge AI Private Limited
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- */
19
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
20
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
21
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.28.7",
3
+ "version": "0.28.8",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -32,7 +32,7 @@
32
32
  "@types/adm-zip": "^0.5.7",
33
33
  "playwright-core": "1.53.2",
34
34
  "serve-handler": "^6.1.6",
35
- "@empiricalrun/shared-types": "0.11.0"
35
+ "@empiricalrun/shared-types": "0.12.0"
36
36
  },
37
37
  "dependencies": {
38
38
  "@babel/code-frame": "^7.24.7",
@@ -43,15 +43,15 @@
43
43
  "mailosaur": "^8.6.1",
44
44
  "puppeteer-extra-plugin-recaptcha": "^3.6.8",
45
45
  "rimraf": "^6.0.1",
46
- "@empiricalrun/llm": "^0.22.0",
46
+ "@empiricalrun/llm": "^0.23.0",
47
47
  "@empiricalrun/r2-uploader": "^0.3.11",
48
- "@empiricalrun/test-gen": "^0.76.0"
48
+ "@empiricalrun/test-gen": "^0.77.0"
49
49
  },
50
50
  "scripts": {
51
51
  "dev": "tsc --build --watch",
52
52
  "build": "tsc --build",
53
53
  "clean": "tsc --build --clean",
54
- "lint": "eslint .",
54
+ "lint": "biome check --unsafe",
55
55
  "test": "vitest run",
56
56
  "test-browser": "npx playwright test",
57
57
  "test:watch": "vitest"
@@ -18,8 +18,11 @@ export default defineConfig({
18
18
  actionTimeout: 5_000,
19
19
  },
20
20
  expect: { timeout: 5_000 },
21
- projects: [{ name: "chromium" }, {
22
- name: "regex-test",
23
- testMatch: /.*\.random-ext.spec\.ts/,
24
- }],
21
+ projects: [
22
+ { name: "chromium" },
23
+ {
24
+ name: "regex-test",
25
+ testMatch: /.*\.random-ext.spec\.ts/,
26
+ },
27
+ ],
25
28
  });
@@ -1 +1 @@
1
- {"root":["./src/email.ts","./src/index.ts","./src/logger.ts","./src/playwright-extensions.ts","./src/auth/google.ts","./src/auth/index.ts","./src/auth/types.ts","./src/captcha/index.ts","./src/captcha/vision.ts","./src/config/index.ts","./src/config/devices/types.ts","./src/overlay-tests/cache.spec.ts","./src/overlay-tests/click.spec.ts","./src/overlay-tests/fixtures.ts","./src/overlay-tests/patch.spec.ts","./src/reporter/base.ts","./src/reporter/custom.ts","./src/reporter/empirical-reporter.ts","./src/reporter/queue.ts","./src/reporter/reporterV2.ts","./src/reporter/types.ts","./src/reporter/uploader.ts","./src/reporter/util.ts","./src/reporter/third_party/html-reporter-types.ts","./src/test/constants.ts","./src/test/expect.ts","./src/test/index.ts","./src/test/types.ts","./src/test/scripts/agent-capabilities.ts","./src/test/scripts/index.ts","./src/test/scripts/locator-highlights.ts","./src/test/scripts/locator-vision.ts","./src/test/scripts/mouse-pointer.ts","./src/test/scripts/types.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/cache.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/index.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/prompt.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/types.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/utils.ts","./src/test/scripts/pw-locator-patch/highlight/click.ts","./src/test/scripts/pw-locator-patch/highlight/expect.ts","./src/test/scripts/pw-locator-patch/highlight/hover.ts","./src/test/scripts/pw-locator-patch/highlight/inner-text.ts","./src/test/scripts/pw-locator-patch/highlight/input-value.ts","./src/test/scripts/pw-locator-patch/highlight/is-checked.ts","./src/test/scripts/pw-locator-patch/highlight/is-disabled.ts","./src/test/scripts/pw-locator-patch/highlight/is-editable.ts","./src/test/scripts/pw-locator-patch/highlight/text-content.ts","./src/test/scripts/pw-locator-patch/utils/index.ts","./src/test/scripts/pw-locator-patch/vision/query.ts"],"version":"5.8.3"}
1
+ {"root":["./src/email.ts","./src/index.ts","./src/logger.ts","./src/playwright-extensions.ts","./src/auth/google.ts","./src/auth/index.ts","./src/auth/types.ts","./src/captcha/index.ts","./src/captcha/vision.ts","./src/config/index.ts","./src/config/devices/types.ts","./src/overlay-tests/cache.spec.ts","./src/overlay-tests/click.spec.ts","./src/overlay-tests/fixtures.ts","./src/overlay-tests/patch.spec.ts","./src/reporter/empirical-reporter.ts","./src/reporter/queue.ts","./src/reporter/types.ts","./src/reporter/uploader.ts","./src/reporter/util.ts","./src/test/constants.ts","./src/test/expect.ts","./src/test/index.ts","./src/test/types.ts","./src/test/scripts/agent-capabilities.ts","./src/test/scripts/index.ts","./src/test/scripts/locator-highlights.ts","./src/test/scripts/locator-vision.ts","./src/test/scripts/mouse-pointer.ts","./src/test/scripts/types.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/cache.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/index.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/prompt.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/types.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/utils.ts","./src/test/scripts/pw-locator-patch/highlight/click.ts","./src/test/scripts/pw-locator-patch/highlight/expect.ts","./src/test/scripts/pw-locator-patch/highlight/hover.ts","./src/test/scripts/pw-locator-patch/highlight/inner-text.ts","./src/test/scripts/pw-locator-patch/highlight/input-value.ts","./src/test/scripts/pw-locator-patch/highlight/is-checked.ts","./src/test/scripts/pw-locator-patch/highlight/is-disabled.ts","./src/test/scripts/pw-locator-patch/highlight/is-editable.ts","./src/test/scripts/pw-locator-patch/highlight/text-content.ts","./src/test/scripts/pw-locator-patch/utils/index.ts","./src/test/scripts/pw-locator-patch/vision/query.ts"],"version":"5.8.3"}
@@ -1,41 +0,0 @@
1
- /**
2
- * Original file: https://github.com/microsoft/playwright/blob/cf8c14f884b6f24966350a5f49b1580c3e183d21/packages/playwright/src/reporters/base.ts
3
- * Copyright (c) Microsoft Corporation.
4
- * Modifications copyright (c) Forge AI Private Limited
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
- import type { FullConfig, Location, TestCase, TestError, TestResult, TestStep } from "@playwright/test/reporter";
19
- export type TestResultOutput = {
20
- chunk: string | Buffer;
21
- type: "stdout" | "stderr";
22
- };
23
- export declare const kOutputSymbol: unique symbol;
24
- type ErrorDetails = {
25
- message: string;
26
- location?: Location;
27
- };
28
- export declare const isTTY: boolean, ttyWidth: number, colors: any;
29
- export declare function formatResultFailure(test: TestCase, result: TestResult, initialIndent: string, highlightCode: boolean): ErrorDetails[];
30
- export declare function relativeFilePath(config: FullConfig, file: string): string;
31
- export declare function stepSuffix(step: TestStep | undefined): string;
32
- export declare function formatError(error: TestError, highlightCode: boolean): ErrorDetails;
33
- export declare function separator(text?: string): string;
34
- export declare function prepareErrorStack(stack: string): {
35
- message: string;
36
- stackLines: string[];
37
- location?: Location;
38
- };
39
- export declare function stripAnsiEscapes(str: string): string;
40
- export {};
41
- //# sourceMappingURL=base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/reporter/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,2BAA2B,CAAC;AAQnC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,aAAa,eAAmB,CAAC;AAE9C,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF,eAAO,MAAQ,KAAK,WAAE,QAAQ,UAAE,MAAM,KA6ClC,CAAC;AAEL,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,UAAU,EAClB,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,OAAO,GACrB,YAAY,EAAE,CAyBhB;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,UAMpD;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,OAAO,GACrB,YAAY,CA+Bd;AAED,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAW,GAAG,MAAM,CAInD;AAMD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAmBA;AAMD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD"}
@@ -1,177 +0,0 @@
1
- "use strict";
2
- /**
3
- * Original file: https://github.com/microsoft/playwright/blob/cf8c14f884b6f24966350a5f49b1580c3e183d21/packages/playwright/src/reporters/base.ts
4
- * Copyright (c) Microsoft Corporation.
5
- * Modifications copyright (c) Forge AI Private Limited
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- */
19
- var __importDefault = (this && this.__importDefault) || function (mod) {
20
- return (mod && mod.__esModule) ? mod : { "default": mod };
21
- };
22
- var _a;
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.colors = exports.ttyWidth = exports.isTTY = exports.kOutputSymbol = void 0;
25
- exports.formatResultFailure = formatResultFailure;
26
- exports.relativeFilePath = relativeFilePath;
27
- exports.stepSuffix = stepSuffix;
28
- exports.formatError = formatError;
29
- exports.separator = separator;
30
- exports.prepareErrorStack = prepareErrorStack;
31
- exports.stripAnsiEscapes = stripAnsiEscapes;
32
- const path_1 = __importDefault(require("path"));
33
- const utilsBundle_1 = require("playwright-core/lib/utilsBundle");
34
- exports.kOutputSymbol = Symbol("output");
35
- _a = (() => {
36
- let isTTY = !!process.stdout.isTTY;
37
- let ttyWidth = process.stdout.columns || 0;
38
- // if (
39
- // process.env.PLAYWRIGHT_FORCE_TTY === "false" ||
40
- // process.env.PLAYWRIGHT_FORCE_TTY === "0"
41
- // ) {
42
- // isTTY = false;
43
- // ttyWidth = 0;
44
- // } else if (
45
- // process.env.PLAYWRIGHT_FORCE_TTY === "true" ||
46
- // process.env.PLAYWRIGHT_FORCE_TTY === "1"
47
- // ) {
48
- // isTTY = true;
49
- // ttyWidth = process.stdout.columns || 100;
50
- // } else if (process.env.PLAYWRIGHT_FORCE_TTY) {
51
- // isTTY = true;
52
- // ttyWidth = +process.env.PLAYWRIGHT_FORCE_TTY;
53
- // if (isNaN(ttyWidth)) ttyWidth = 100;
54
- // }
55
- let useColors = isTTY;
56
- // if (
57
- // process.env.DEBUG_COLORS === "0" ||
58
- // process.env.DEBUG_COLORS === "false" ||
59
- // process.env.FORCE_COLOR === "0" ||
60
- // process.env.FORCE_COLOR === "false"
61
- // )
62
- // useColors = false;
63
- // else if (process.env.DEBUG_COLORS || process.env.FORCE_COLOR)
64
- // useColors = true;
65
- const colors = useColors
66
- ? utilsBundle_1.colors
67
- : {
68
- bold: (t) => t,
69
- cyan: (t) => t,
70
- dim: (t) => t,
71
- gray: (t) => t,
72
- green: (t) => t,
73
- red: (t) => t,
74
- yellow: (t) => t,
75
- enabled: false,
76
- };
77
- return { isTTY, ttyWidth, colors };
78
- })(), exports.isTTY = _a.isTTY, exports.ttyWidth = _a.ttyWidth, exports.colors = _a.colors;
79
- function formatResultFailure(test, result, initialIndent, highlightCode) {
80
- const errorDetails = [];
81
- if (result.status === "passed" && test.expectedStatus === "failed") {
82
- errorDetails.push({
83
- message: indent(exports.colors.red(`Expected to fail, but passed.`), initialIndent),
84
- });
85
- }
86
- if (result.status === "interrupted") {
87
- errorDetails.push({
88
- message: indent(exports.colors.red(`Test was interrupted.`), initialIndent),
89
- });
90
- }
91
- for (const error of result.errors) {
92
- const formattedError = formatError(error, highlightCode);
93
- errorDetails.push({
94
- message: indent(formattedError.message, initialIndent),
95
- location: formattedError.location,
96
- });
97
- }
98
- return errorDetails;
99
- }
100
- function relativeFilePath(config, file) {
101
- return path_1.default.relative(config.rootDir, file) || path_1.default.basename(file);
102
- }
103
- function stepSuffix(step) {
104
- const stepTitles = step ? step.titlePath() : [];
105
- return stepTitles
106
- .map((t) => t.split("\n")[0])
107
- .map((t) => " › " + t)
108
- .join("");
109
- }
110
- function formatError(error, highlightCode) {
111
- const message = error.message || error.value || "";
112
- const stack = error.stack;
113
- if (!stack && !error.location)
114
- return { message };
115
- const tokens = [];
116
- // Now that we filter out internals from our stack traces, we can safely render
117
- // the helper / original exception locations.
118
- const parsedStack = stack ? prepareErrorStack(stack) : undefined;
119
- tokens.push(parsedStack?.message || message);
120
- if (error.snippet) {
121
- let snippet = error.snippet;
122
- if (!highlightCode)
123
- snippet = stripAnsiEscapes(snippet);
124
- tokens.push("");
125
- tokens.push(snippet);
126
- }
127
- if (parsedStack && parsedStack.stackLines.length) {
128
- tokens.push("");
129
- tokens.push(exports.colors.dim(parsedStack.stackLines.join("\n")));
130
- }
131
- let location = error.location;
132
- if (parsedStack && !location)
133
- location = parsedStack.location;
134
- return {
135
- location,
136
- message: tokens.join("\n"),
137
- };
138
- }
139
- function separator(text = "") {
140
- if (text)
141
- text += " ";
142
- const columns = Math.min(100, exports.ttyWidth || 100);
143
- return text + exports.colors.dim("─".repeat(Math.max(0, columns - text.length)));
144
- }
145
- function indent(lines, tab) {
146
- return lines.replace(/^(?=.+$)/gm, tab);
147
- }
148
- function prepareErrorStack(stack) {
149
- const lines = stack.split("\n");
150
- let firstStackLine = lines.findIndex((line) => line.startsWith(" at "));
151
- if (firstStackLine === -1)
152
- firstStackLine = lines.length;
153
- const message = lines.slice(0, firstStackLine).join("\n");
154
- const stackLines = lines.slice(firstStackLine);
155
- let location;
156
- for (const line of stackLines) {
157
- const frame = (0, utilsBundle_1.parseStackTraceLine)(line);
158
- if (!frame || !frame.file)
159
- continue;
160
- if (belongsToNodeModules(frame.file))
161
- continue;
162
- location = {
163
- file: frame.file,
164
- column: frame.column || 0,
165
- line: frame.line || 0,
166
- };
167
- break;
168
- }
169
- return { message, stackLines, location };
170
- }
171
- const ansiRegex = new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))", "g");
172
- function stripAnsiEscapes(str) {
173
- return str.replace(ansiRegex, "");
174
- }
175
- function belongsToNodeModules(file) {
176
- return file.includes(`${path_1.default.sep}node_modules${path_1.default.sep}`);
177
- }
@@ -1,72 +0,0 @@
1
- /**
2
- * Original file: https://github.com/microsoft/playwright/blob/cf8c14f884b6f24966350a5f49b1580c3e183d21/packages/playwright/src/reporters/html.ts
3
- * Copyright (c) Microsoft Corporation.
4
- * Modifications copyright (c) Forge AI Private Limited
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
- import type { FullConfig, FullResult, Suite, TestCase as TestCasePublic, TestError, TestResult as TestResultPublic } from "@playwright/test/reporter";
19
- import { HttpServer } from "playwright-core/lib/utils";
20
- import type { ReporterV2 } from "./reporterV2";
21
- declare const htmlReportOptions: string[];
22
- type HtmlReportOpenOption = (typeof htmlReportOptions)[number];
23
- type HtmlReporterOptions = {
24
- configDir: string;
25
- outputFolder?: string;
26
- open?: HtmlReportOpenOption;
27
- host?: string;
28
- port?: number;
29
- attachmentsBaseURL?: string;
30
- _mode?: "test" | "list";
31
- _isTestServer?: boolean;
32
- };
33
- declare class HtmlReporter implements ReporterV2 {
34
- private config;
35
- private suite;
36
- private _options;
37
- private _outputFolder;
38
- private _attachmentsBaseURL;
39
- private _open;
40
- private _port;
41
- private _host;
42
- private haveSeenAttachments;
43
- private _buildResult;
44
- private _topLevelErrors;
45
- constructor(options: HtmlReporterOptions);
46
- printsToStdio(): boolean;
47
- onStdOut(): void;
48
- onStdErr(): void;
49
- onStepBegin(): void;
50
- onStepEnd(): void;
51
- onTestBegin(test: TestCasePublic): void;
52
- version(): "v2";
53
- onTestEnd(test: TestCasePublic, result: TestResultPublic): void;
54
- private processTestAttachment;
55
- onConfigure(config: FullConfig): void;
56
- onBegin(suite: Suite): void;
57
- _resolveOptions(): {
58
- outputFolder: string;
59
- open: HtmlReportOpenOption;
60
- attachmentsBaseURL: string;
61
- host: string | undefined;
62
- port: number | undefined;
63
- };
64
- _isSubdirectory(parentDir: string, dir: string): boolean;
65
- onError(error: TestError): void;
66
- onEnd(result: FullResult): Promise<void>;
67
- onExit(): Promise<void>;
68
- }
69
- export declare function showHTMLReport(reportFolder: string | undefined, host?: string, port?: number, testId?: string): Promise<void>;
70
- export declare function startHtmlReportServer(folder: string): HttpServer;
71
- export default HtmlReporter;
72
- //# sourceMappingURL=custom.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/reporter/custom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EAMV,KAAK,EACL,QAAQ,IAAI,cAAc,EAC1B,SAAS,EACT,UAAU,IAAI,gBAAgB,EAE/B,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAML,UAAU,EAMX,MAAM,2BAA2B,CAAC;AAkBnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAuC/C,QAAA,MAAM,iBAAiB,UAAoC,CAAC;AAC5D,KAAK,oBAAoB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAM/D,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,M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