@playwright/test 1.36.0-alpha-jun-17-2023 → 1.36.0-alpha-jun-19-2023

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.
@@ -122,7 +122,7 @@ class TeleReporterReceiver {
122
122
  (_this$_reporter$onTes = (_this$_reporter2 = this._reporter).onTestBegin) === null || _this$_reporter$onTes === void 0 ? void 0 : _this$_reporter$onTes.call(_this$_reporter2, test, testResult);
123
123
  }
124
124
  _onTestEnd(testEndPayload, payload) {
125
- var _this$_reporter$onTes2, _this$_reporter3;
125
+ var _result$errors, _this$_reporter$onTes2, _this$_reporter3;
126
126
  const test = this._tests.get(testEndPayload.testId);
127
127
  test.timeout = testEndPayload.timeout;
128
128
  test.expectedStatus = testEndPayload.expectedStatus;
@@ -132,6 +132,7 @@ class TeleReporterReceiver {
132
132
  result.status = payload.status;
133
133
  result.statusEx = payload.status;
134
134
  result.errors = payload.errors;
135
+ result.error = (_result$errors = result.errors) === null || _result$errors === void 0 ? void 0 : _result$errors[0];
135
136
  result.attachments = this._parseAttachments(payload.attachments);
136
137
  (_this$_reporter$onTes2 = (_this$_reporter3 = this._reporter).onTestEnd) === null || _this$_reporter$onTes2 === void 0 ? void 0 : _this$_reporter$onTes2.call(_this$_reporter3, test, result);
137
138
  }
@@ -141,7 +142,10 @@ class TeleReporterReceiver {
141
142
  const result = test.resultsMap.get(resultId);
142
143
  const parentStep = payload.parentStepId ? result.stepMap.get(payload.parentStepId) : undefined;
143
144
  const step = {
144
- titlePath: () => [],
145
+ titlePath: () => {
146
+ const parentPath = (parentStep === null || parentStep === void 0 ? void 0 : parentStep.titlePath()) || [];
147
+ return [...parentPath, payload.title];
148
+ },
145
149
  title: payload.title,
146
150
  category: payload.category,
147
151
  location: this._absoluteLocation(payload.location),
@@ -76,7 +76,10 @@ class BlobReporter extends _teleEmitter.TeleReporterEmitter {
76
76
  }
77
77
  _serializeAttachments(attachments) {
78
78
  return super._serializeAttachments(attachments).map(attachment => {
79
- if (!attachment.path || !_fs.default.statSync(attachment.path).isFile()) return attachment;
79
+ var _fs$statSync;
80
+ if (!attachment.path || !((_fs$statSync = _fs.default.statSync(attachment.path, {
81
+ throwIfNoEntry: false
82
+ })) !== null && _fs$statSync !== void 0 && _fs$statSync.isFile())) return attachment;
80
83
  // Add run guid to avoid clashes between shards.
81
84
  const sha1 = (0, _utils.calculateSha1)(attachment.path + this._salt);
82
85
  const extension = _utilsBundle.mime.getExtension(attachment.contentType) || 'dat';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playwright/test",
3
- "version": "1.36.0-alpha-jun-17-2023",
3
+ "version": "1.36.0-alpha-jun-19-2023",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": "github:Microsoft/playwright",
6
6
  "homepage": "https://playwright.dev",
@@ -41,7 +41,7 @@
41
41
  "license": "Apache-2.0",
42
42
  "dependencies": {
43
43
  "@types/node": "*",
44
- "playwright-core": "1.36.0-alpha-jun-17-2023"
44
+ "playwright-core": "1.36.0-alpha-jun-19-2023"
45
45
  },
46
46
  "optionalDependencies": {
47
47
  "fsevents": "2.3.2"