New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wdio-reportportal-reporter

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wdio-reportportal-reporter - npm Package Compare versions

Comparing version 5.2.2 to 5.2.3

1

build/constants.js

@@ -9,2 +9,3 @@ "use strict";

EVENTS["RP_TEST_FILE"] = "rp:failedFile";
EVENTS["RP_TEST_RETRY"] = "rp:testRetry";
})(EVENTS = exports.EVENTS || (exports.EVENTS = {}));

@@ -11,0 +12,0 @@ var STATUS;

@@ -7,2 +7,3 @@ "use strict";

this.name = "";
this.retry = false;
this.name = name;

@@ -9,0 +10,0 @@ this.type = type;

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -47,2 +48,5 @@ });

}
static finishTestManually(test) {
utils_1.sendToReporter(constants_1.EVENTS.RP_TEST_RETRY, { test });
}
onSuiteStart(suite) {

@@ -83,2 +87,5 @@ log.trace(`Start suite ${suite.title} ${suite.uid}`);

}
if (this.options.setRetryTrue) {
testStartObj.retry = true;
}
utils_1.addBrowserParam(this.sanitizedCapabilities, testStartObj);

@@ -215,2 +222,17 @@ const { tempId, promise } = this.client.startTestItem(testStartObj, this.tempLaunchId, suite.id);

}
finishTestManually(event) {
const testItem = this.storage.getCurrentTest();
if (testItem === null) {
return;
}
const err = {
stack: event.test.error,
};
const test = {
error: err,
title: testItem.wdioEntity.title,
uid: testItem.wdioEntity.uid,
};
this.testFinished(test, constants_1.STATUS.FAILED);
}
sendLog(event) {

@@ -292,2 +314,4 @@ const testItem = this.storage.getCurrentTest();

process.on(constants_1.EVENTS.RP_TEST_FILE, this.sendFileToTest.bind(this));
// @ts-ignore
process.on(constants_1.EVENTS.RP_TEST_RETRY, this.finishTestManually.bind(this));
}

@@ -294,0 +318,0 @@ now() {

@@ -12,2 +12,3 @@ "use strict";

this.parseTagsFromTestTitle = false;
this.setRetryTrue = false;
this.reportPortalClientConfig = { mode: constants_1.MODE.DEFAULT, tags: [], description: "" };

@@ -14,0 +15,0 @@ }

8

lib/__tests__/startSuite.spec.ts

@@ -21,3 +21,3 @@ import {TYPE} from "../constants";

expect(reporter.client.startTestItem).toBeCalledWith(
{name: "foo", type: TYPE.SUITE},
{name: "foo", type: TYPE.SUITE, retry: false},
reporter.tempLaunchId,

@@ -33,3 +33,3 @@ null,

expect(reporter.client.startTestItem).toBeCalledWith(
{name: "foo", type: TYPE.SUITE},
{description: undefined, name: "foo", type: TYPE.SUITE, retry: false},
reporter.tempLaunchId,

@@ -47,3 +47,3 @@ null,

1,
{name: "foo", type: TYPE.SUITE},
{name: "foo", type: TYPE.SUITE, retry: false},
reporter.tempLaunchId,

@@ -56,3 +56,3 @@ null,

2,
{name: "foo", type: TYPE.SUITE},
{name: "foo", type: TYPE.SUITE, retry: false},
reporter.tempLaunchId,

@@ -59,0 +59,0 @@ id,

@@ -6,2 +6,3 @@ export enum EVENTS {

RP_TEST_FILE = "rp:failedFile",
RP_TEST_RETRY = "rp:testRetry",
}

@@ -8,0 +9,0 @@

@@ -12,2 +12,3 @@ import {STATUS, TYPE} from "./constants";

public codeRef: string;
public retry = false;

@@ -14,0 +15,0 @@ constructor(name: string, type: TYPE) {

@@ -40,2 +40,6 @@ import logger from "@wdio/logger";

public static finishTestManually(test: any) {
sendToReporter(EVENTS.RP_TEST_RETRY, {test});
}
private static reporterName = "reportportal";

@@ -99,2 +103,5 @@ private launchId: string;

}
if (this.options.setRetryTrue) {
testStartObj.retry = true;
}
addBrowserParam(this.sanitizedCapabilities, testStartObj);

@@ -246,2 +253,18 @@

private finishTestManually(event: any) {
const testItem = this.storage.getCurrentTest();
if (testItem === null) {
return;
}
const err = {
stack: event.test.error,
};
const test = {
error: err,
title: testItem.wdioEntity.title,
uid: testItem.wdioEntity.uid,
};
this.testFinished(test, STATUS.FAILED);
}
private sendLog(event: any) {

@@ -329,2 +352,4 @@ const testItem = this.storage.getCurrentTest();

process.on(EVENTS.RP_TEST_FILE, this.sendFileToTest.bind(this));
// @ts-ignore
process.on(EVENTS.RP_TEST_RETRY, this.finishTestManually.bind(this));
}

@@ -331,0 +356,0 @@

@@ -10,3 +10,4 @@ import {LEVEL, MODE} from "./constants";

public parseTagsFromTestTitle = false;
public setRetryTrue = false;
public reportPortalClientConfig = {mode: MODE.DEFAULT, tags: [], description: ""};
}
{
"name": "wdio-reportportal-reporter",
"version": "5.2.2",
"version": "5.2.3",
"description": "A WebdriverIO v5 plugin. Report results to Report Portal.",

@@ -37,17 +37,17 @@ "main": "build/reporter.js",

"json-stringify-safe": "~5.0.1",
"validator": "^11.1.0",
"@wdio/reporter": "^5.14.5",
"@wdio/logger": "^5.9.3",
"reportportal-js-client": "^1.2.0"
"validator": "^12.0.0",
"@wdio/reporter": "^5.15.2",
"@wdio/logger": "^5.16.10",
"reportportal-js-client": "^1.2.1"
},
"devDependencies": {
"@types/jest": "^24.0.19",
"@types/node": "^12.0.12",
"jest": "^24.8.0",
"ts-jest": "^24.0.2",
"@types/jest": "^24.0.23",
"@types/node": "^12.12.14",
"jest": "^24.9.0",
"ts-jest": "^24.2.0",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.0",
"ts-node": "^8.3.0",
"tslint": "^5.17.0",
"typescript": "^3.5.3"
"ts-node": "^8.5.2",
"tslint": "^5.20.1",
"typescript": "^3.7.2"
},

@@ -54,0 +54,0 @@ "contributors": [

@@ -15,4 +15,4 @@ WDIO Report Portal Reporter

"devDependencies": {
"wdio-reportportal-reporter": "5.2.2",
"wdio-reportportal-service": "5.2.2"
"wdio-reportportal-reporter": "5.2.3",
"wdio-reportportal-service": "5.2.3"
}

@@ -19,0 +19,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc