@bigbinary/neeto-playwright-reporter 1.3.13 → 1.3.14

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/index.cjs.js CHANGED
@@ -18653,15 +18653,15 @@ class MyReporter {
18653
18653
  };
18654
18654
  this.onTestBegin = async ({ id, title }, { retry }) => {
18655
18655
  var _a, _b;
18656
+ this.retryAttemptStartedAt = new Date();
18656
18657
  this.unreportedAttemptCount++;
18657
18658
  consoleLogFormatted.invertBackground(MESSAGES.onTestBegin.startingTest(title));
18658
18659
  try {
18659
- this.retryAttemptStartedAt = new Date();
18660
18660
  while (!((_b = (_a = this.attempts) === null || _a === void 0 ? void 0 : _a[id]) === null || _b === void 0 ? void 0 : _b["0"]))
18661
18661
  await waitUntilTimeout(100); // Poll every 100 milliseconds
18662
18662
  const attemptsPayload = {
18663
18663
  status: "running",
18664
- started_at: new Date().toString(),
18664
+ started_at: this.retryAttemptStartedAt.toString(),
18665
18665
  shard: this.currentShard,
18666
18666
  };
18667
18667
  if (retry === 0) {
@@ -18676,6 +18676,7 @@ class MyReporter {
18676
18676
  [String(retry)]: attempt_id,
18677
18677
  },
18678
18678
  };
18679
+ this.testAttemptIds.push(`${history_id}-${attempt_id}`);
18679
18680
  }
18680
18681
  }
18681
18682
  catch (error) {
@@ -18717,7 +18718,8 @@ class MyReporter {
18717
18718
  return uploadToS3(file, direct_upload);
18718
18719
  }
18719
18720
  }));
18720
- while (!this.attempts[id][retry])
18721
+ while (!(this.attempts[id][retry] ||
18722
+ this.testAttemptIds.includes(`${id}-${this.attempts[id][retry]}`)))
18721
18723
  await waitUntilTimeout(100);
18722
18724
  this.testResultCalls.push(attemptsApi.update(this.ciBuildId, id, this.attempts[id][retry], testResult));
18723
18725
  }
@@ -18766,6 +18768,7 @@ class MyReporter {
18766
18768
  this.reportedTestCount = 0;
18767
18769
  this.unreportedAttemptCount = 0;
18768
18770
  this.hasRunStarted = false;
18771
+ this.testAttemptIds = [];
18769
18772
  process.on("unhandledRejection", error => {
18770
18773
  var _a, _b, _c;
18771
18774
  const data = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data;