wdio-qase-reporter 1.0.0-beta.3 → 1.0.0-beta.4

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,3 +1,14 @@
1
+ # qase-wdio@1.0.0-beta.4
2
+
3
+ ## What's new
4
+
5
+ Fix an issue with attaching the screenshot to the test case. Now, the reporter will correctly handle the screenshots and
6
+ will attach them to the test case in the Qase TMS.
7
+
8
+ ```log
9
+ The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object
10
+ ```
11
+
1
12
  # qase-wdio@1.0.0-beta.3
2
13
 
3
14
  ## What's new
package/dist/reporter.js CHANGED
@@ -214,11 +214,11 @@ class WDIOQaseReporter extends reporter_1.default {
214
214
  }
215
215
  onAfterCommand(command) {
216
216
  const { disableWebdriverStepsReporting, disableWebdriverScreenshotsReporting } = this._options;
217
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
218
- const commandResult = command.result || undefined;
217
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
218
+ const commandResult = command.result.value || undefined;
219
219
  const isScreenshot = (0, utils_1.isScreenshotCommand)(command);
220
220
  if (!disableWebdriverScreenshotsReporting && isScreenshot && commandResult) {
221
- this.attachFile('Screenshot', Buffer.from(commandResult, 'base64'), 'image/png');
221
+ this.attachFile('Screenshot.png', Buffer.from(commandResult, 'base64'), 'image/png');
222
222
  }
223
223
  if (disableWebdriverStepsReporting || this._isMultiremote || !this.storage.getCurrentStep()) {
224
224
  return;
@@ -396,7 +396,6 @@ class WDIOQaseReporter extends reporter_1.default {
396
396
  mime_type: contentType,
397
397
  content: content,
398
398
  };
399
- console.log('attachFile:', attach);
400
399
  this.storage.getLastItem()?.attachments.push(attach);
401
400
  }
402
401
  _endStep(status = qase_javascript_commons_1.TestStatusEnum.passed) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wdio-qase-reporter",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.4",
4
4
  "description": "Qase WebDriverIO Reporter",
5
5
  "homepage": "https://github.com/qase-tms/qase-javascript",
6
6
  "sideEffects": false,