@wdio/reporter 9.12.3 → 9.13.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/build/index.cjs +10 -2
- package/build/index.d.ts +7 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +8 -1
- package/package.json +3 -3
package/build/index.cjs
CHANGED
|
@@ -35,10 +35,12 @@ __export(index_exports, {
|
|
|
35
35
|
RunnerStats: () => RunnerStats,
|
|
36
36
|
SuiteStats: () => SuiteStats,
|
|
37
37
|
TestStats: () => TestStats,
|
|
38
|
-
default: () => WDIOReporter
|
|
38
|
+
default: () => WDIOReporter,
|
|
39
|
+
getBrowserName: () => getBrowserName
|
|
39
40
|
});
|
|
40
41
|
module.exports = __toCommonJS(index_exports);
|
|
41
42
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
43
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
42
44
|
var import_node_events = require("node:events");
|
|
43
45
|
|
|
44
46
|
// src/supportsColor.ts
|
|
@@ -724,10 +726,16 @@ var WDIOReporter = class extends import_node_events.EventEmitter {
|
|
|
724
726
|
onRunnerEnd(_runnerStats) {
|
|
725
727
|
}
|
|
726
728
|
};
|
|
729
|
+
function getBrowserName(caps) {
|
|
730
|
+
const app = (caps["appium:app"] || caps.app || "").replace("sauce-storage:", "");
|
|
731
|
+
const appName = caps["appium:bundleId"] || caps["appium:appPackage"] || caps["appium:appActivity"] || (import_node_path.default.isAbsolute(app) ? import_node_path.default.basename(app) : app);
|
|
732
|
+
return caps.browserName || caps.browser || appName;
|
|
733
|
+
}
|
|
727
734
|
// Annotate the CommonJS export names for ESM import in node:
|
|
728
735
|
0 && (module.exports = {
|
|
729
736
|
HookStats,
|
|
730
737
|
RunnerStats,
|
|
731
738
|
SuiteStats,
|
|
732
|
-
TestStats
|
|
739
|
+
TestStats,
|
|
740
|
+
getBrowserName
|
|
733
741
|
});
|
package/build/index.d.ts
CHANGED
|
@@ -60,5 +60,11 @@ export default class WDIOReporter extends EventEmitter {
|
|
|
60
60
|
onSuiteEnd(_suiteStats: SuiteStats): void;
|
|
61
61
|
onRunnerEnd(_runnerStats: RunnerStats): void;
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Returns the browser name from the capabilities
|
|
65
|
+
* @param caps WebdriverIO Capabilities
|
|
66
|
+
* @returns {string} Browser name
|
|
67
|
+
*/
|
|
68
|
+
declare function getBrowserName(caps: WebdriverIO.Capabilities): any;
|
|
69
|
+
export { SuiteStats, Tag, HookStats, TestStats, RunnerStats, BeforeCommandArgs, AfterCommandArgs, CommandArgs, Argument, Test, getBrowserName };
|
|
64
70
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAW,MAAM,aAAa,CAAA;AAIrD,OAAO,UAAU,MAAM,kBAAkB,CAAA;AAEzC,OAAO,SAAS,MAAM,iBAAiB,CAAA;AACvC,OAAO,SAAS,EAAE,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,WAAW,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAEjG,KAAK,iBAAiB,GAAG;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAA;CAAE,CAAA;AAEjE,MAAM,CAAC,OAAO,OAAO,YAAa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AAY,CAAC,WAAW,EAAE,UAAU;IACpC,UAAU,CAAC,WAAW,EAAE,UAAU;IAClC,WAAW,CAAC,YAAY,EAAE,WAAW;CACxC;AAED;;;;GAIG;AACH,iBAAS,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,OAWrD;AAED,OAAO,EACH,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EACrE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAChE,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
3
4
|
import { EventEmitter } from "node:events";
|
|
4
5
|
|
|
5
6
|
// src/supportsColor.ts
|
|
@@ -685,10 +686,16 @@ var WDIOReporter = class extends EventEmitter {
|
|
|
685
686
|
onRunnerEnd(_runnerStats) {
|
|
686
687
|
}
|
|
687
688
|
};
|
|
689
|
+
function getBrowserName(caps) {
|
|
690
|
+
const app = (caps["appium:app"] || caps.app || "").replace("sauce-storage:", "");
|
|
691
|
+
const appName = caps["appium:bundleId"] || caps["appium:appPackage"] || caps["appium:appActivity"] || (path.isAbsolute(app) ? path.basename(app) : app);
|
|
692
|
+
return caps.browserName || caps.browser || appName;
|
|
693
|
+
}
|
|
688
694
|
export {
|
|
689
695
|
HookStats,
|
|
690
696
|
RunnerStats,
|
|
691
697
|
SuiteStats,
|
|
692
698
|
TestStats,
|
|
693
|
-
WDIOReporter as default
|
|
699
|
+
WDIOReporter as default,
|
|
700
|
+
getBrowserName
|
|
694
701
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/reporter",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.13.0",
|
|
4
4
|
"description": "A WebdriverIO utility to help reporting all events",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-reporter",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@types/node": "^20.1.0",
|
|
41
41
|
"@wdio/logger": "9.4.4",
|
|
42
|
-
"@wdio/types": "9.
|
|
42
|
+
"@wdio/types": "9.13.0",
|
|
43
43
|
"diff": "^7.0.0",
|
|
44
44
|
"object-inspect": "^1.12.0"
|
|
45
45
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"@types/tmp": "^0.2.3",
|
|
51
51
|
"tmp": "^0.2.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "8eb40a63ea043e3d6c292087b28a8ad4949484b0"
|
|
54
54
|
}
|