@empiricalrun/playwright-utils 0.53.0 → 0.54.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @empiricalrun/playwright-utils
2
2
 
3
+ ## 0.54.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c28a815: feat: pi-sbx supports custom pw-utils
8
+
9
+ ### Patch Changes
10
+
11
+ - @empiricalrun/cua@0.4.1
12
+ - @empiricalrun/dashboard-client@0.3.0
13
+ - @empiricalrun/llm@0.27.0
14
+ - @empiricalrun/reporter@0.29.1
15
+
3
16
  ## 0.53.0
4
17
 
5
18
  ### Minor Changes
@@ -9,6 +9,7 @@ declare class EmpiricalReporter implements Reporter {
9
9
  private _uploader;
10
10
  private _attachmentCleanup;
11
11
  constructor();
12
+ private _piSandboxLog;
12
13
  private enqueTestAttachmentUploadTask;
13
14
  onTestEnd(test: TestCase, result: TestResult): void;
14
15
  onEnd(result: FullResult): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"empirical-reporter.d.ts","sourceRoot":"","sources":["../../src/reporter/empirical-reporter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACX,MAAM,2BAA2B,CAAC;AAuBnC,cAAM,iBAAkB,YAAW,QAAQ;IACzC,OAAO,CAAC,kBAAkB,CAAyB;IACnD,OAAO,CAAC,oBAAoB,CAG1B;IACF,OAAO,CAAC,sBAAsB,CAAuB;IACrD,OAAO,CAAC,YAAY,CAAgD;IACpE,OAAO,CAAC,iBAAiB,CAAyC;IAClE,OAAO,CAAC,gBAAgB,CAAkC;IAC1D,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,kBAAkB,CAA2B;;IAMrD,OAAO,CAAC,6BAA6B,CAuCnC;IAEF,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU;IAmItC,KAAK,CAAC,MAAM,EAAE,UAAU;IAuG9B,OAAO,CAAC,qBAAqB;YAkBf,gBAAgB;YAOhB,iBAAiB;CAqChC;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"empirical-reporter.d.ts","sourceRoot":"","sources":["../../src/reporter/empirical-reporter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACX,MAAM,2BAA2B,CAAC;AAuBnC,cAAM,iBAAkB,YAAW,QAAQ;IACzC,OAAO,CAAC,kBAAkB,CAAyB;IACnD,OAAO,CAAC,oBAAoB,CAG1B;IACF,OAAO,CAAC,sBAAsB,CAAuB;IACrD,OAAO,CAAC,YAAY,CAAgD;IACpE,OAAO,CAAC,iBAAiB,CAAyC;IAClE,OAAO,CAAC,gBAAgB,CAAkC;IAC1D,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,kBAAkB,CAA2B;;IAMrD,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,6BAA6B,CAuCnC;IAEF,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU;IAmItC,KAAK,CAAC,MAAM,EAAE,UAAU;IAmH9B,OAAO,CAAC,qBAAqB;YAkBf,gBAAgB;YAOhB,iBAAiB;CAqChC;AAED,eAAe,iBAAiB,CAAC"}
@@ -26,6 +26,13 @@ class EmpiricalReporter {
26
26
  constructor() {
27
27
  this._uploader = (0, uploader_1.getUploader)();
28
28
  }
29
+ _piSandboxLog(message) {
30
+ const runningInsidePiSandbox = process.env.RUNNING_INSIDE_PI_SANDBOX === "true";
31
+ if (!runningInsidePiSandbox) {
32
+ return;
33
+ }
34
+ console.log(message);
35
+ }
29
36
  enqueTestAttachmentUploadTask = async (attachment) => {
30
37
  if (!this._uploader) {
31
38
  return;
@@ -177,7 +184,8 @@ class EmpiricalReporter {
177
184
  if (htmlExists && jsonExists) {
178
185
  logger_1.logger.debug("[Empirical Reporter] Patching HTML with attachment URLs");
179
186
  await (0, util_1.updateHtmlZipFileAttachmentPaths)(jsonFilePath, htmlFilePath, this._testResultSourceDir);
180
- await this._uploader.uploadFile(htmlFilePath, "index.html");
187
+ const htmlReportUrl = await this._uploader.uploadFile(htmlFilePath, "index.html");
188
+ this._piSandboxLog(`[Empirical Reporter] HTML report URL: ${htmlReportUrl}`);
181
189
  }
182
190
  else if (!htmlExists) {
183
191
  logger_1.logger.error(`[Empirical Reporter] index.html not found at: ${htmlFilePath}`);
@@ -185,7 +193,8 @@ class EmpiricalReporter {
185
193
  if (jsonExists) {
186
194
  logger_1.logger.debug("[Empirical Reporter] Patching summary.json with attachment URLs");
187
195
  await (0, util_1.updateSummaryJsonAttachmentPaths)(jsonFilePath, this._testResultSourceDir, `${this._uploader.urlPrefix}/data`);
188
- await this._uploader.uploadFile(jsonFilePath, "summary.json");
196
+ const summaryJsonUrl = await this._uploader.uploadFile(jsonFilePath, "summary.json");
197
+ this._piSandboxLog(`[Empirical Reporter] summary.json URL: ${summaryJsonUrl}`);
189
198
  }
190
199
  else {
191
200
  logger_1.logger.error(`[Empirical Reporter] summary.json not found at: ${jsonFilePath}`);
@@ -125,7 +125,7 @@ function suitesAndProjectForTest(test) {
125
125
  };
126
126
  }
127
127
  async function sendTestCaseUpdateToDashboard(params) {
128
- const DOMAIN = process.env.DASHBOARD_DOMAIN || "https://dash.empirical.run";
128
+ const DOMAIN = process.env.DASHBOARD_DOMAIN || "https://api.empirical.run";
129
129
  try {
130
130
  const requestBody = {
131
131
  name: "test_case_run_end",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.53.0",
3
+ "version": "0.54.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -40,7 +40,7 @@
40
40
  "@types/serve-handler": "^6.1.4",
41
41
  "playwright-core": "1.60.0",
42
42
  "serve-handler": "^6.1.6",
43
- "@empiricalrun/shared-types": "0.14.0"
43
+ "@empiricalrun/shared-types": "0.15.1"
44
44
  },
45
45
  "dependencies": {
46
46
  "@babel/code-frame": "^7.24.7",