wdio-obsidian-reporter 1.3.3 → 2.0.1
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/README.md +2 -6
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/package.json +8 -9
package/README.md
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/wdio-obsidian-reporter)
|
|
2
|
-
# WDIO Obsidian Reporter
|
|
3
|
-
|
|
4
|
-
`wdio-obsidian-reporter` is simple extension of [@wdio/spec-reporter](https://www.npmjs.com/package/@wdio/spec-reporter)
|
|
5
|
-
that prints the Obsidian version instead of the Chrome version when using
|
|
6
|
-
[wdio-obsidian-service](../wdio-obsidian-service/README.md).
|
|
1
|
+
# WDIO Obsidian Reporter [](https://www.npmjs.com/package/wdio-obsidian-reporter)
|
|
7
2
|
|
|
3
|
+
`wdio-obsidian-reporter` is simple extension of [@wdio/spec-reporter](https://www.npmjs.com/package/@wdio/spec-reporter) that prints the Obsidian version instead of the Chrome version when using [wdio-obsidian-service](../wdio-obsidian-service/README.md).
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,22 @@ var ObsidianReporter = class extends SpecReporter {
|
|
|
6
6
|
}
|
|
7
7
|
// Override this method to change the label shown for each capability
|
|
8
8
|
getHeaderDisplay(runner) {
|
|
9
|
-
const
|
|
9
|
+
const cap = runner.config.capabilities;
|
|
10
|
+
const obsidianOptions = cap?.["wdio:obsidianOptions"];
|
|
10
11
|
let combo;
|
|
11
12
|
if (obsidianOptions) {
|
|
12
|
-
const appVersion = obsidianOptions
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const { appVersion, installerVersion, emulateMobile } = obsidianOptions;
|
|
14
|
+
const automationName = cap["appium:options"]?.automationName ?? cap["appium:automationName"];
|
|
15
|
+
const isAppium = automationName?.toLocaleLowerCase() == "uiautomator2";
|
|
16
|
+
let platform;
|
|
17
|
+
if (isAppium) {
|
|
18
|
+
platform = "android";
|
|
19
|
+
} else if (emulateMobile) {
|
|
20
|
+
platform = "emulate-mobile";
|
|
21
|
+
} else {
|
|
22
|
+
platform = process.platform;
|
|
23
|
+
}
|
|
24
|
+
combo = `obsidian v${appVersion} (installer: v${installerVersion}, platform: ${platform})`;
|
|
15
25
|
} else {
|
|
16
26
|
combo = this.getEnviromentCombo(runner.capabilities, void 0, runner.isMultiremote).trim();
|
|
17
27
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @module\n * @document ../README.md\n */\nimport SpecReporter from '@wdio/spec-reporter';\nimport { RunnerStats } from \"@wdio/reporter\"\nimport { Reporters } from \"@wdio/types\"\n\nclass ObsidianReporter extends SpecReporter {\n constructor(options: any) {\n super({showPreface: false, ...options})\n }\n\n // Override this method to change the label shown for each capability \n getHeaderDisplay(runner: RunnerStats) {\n const
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @module\n * @document ../README.md\n */\nimport SpecReporter from '@wdio/spec-reporter';\nimport { RunnerStats } from \"@wdio/reporter\"\nimport { Reporters } from \"@wdio/types\"\n\nclass ObsidianReporter extends SpecReporter {\n constructor(options: any) {\n super({showPreface: false, ...options})\n }\n\n // Override this method to change the label shown for each capability \n getHeaderDisplay(runner: RunnerStats) {\n const cap = (runner.config as any).capabilities;\n const obsidianOptions = cap?.['wdio:obsidianOptions'];\n\n let combo: string\n if (obsidianOptions) {\n const {appVersion, installerVersion, emulateMobile} = obsidianOptions;\n const automationName = cap['appium:options']?.automationName ?? cap['appium:automationName']\n const isAppium = automationName?.toLocaleLowerCase() == 'uiautomator2'\n let platform: string\n if (isAppium) {\n platform = \"android\";\n } else if (emulateMobile) {\n platform = \"emulate-mobile\";\n } else {\n platform = process.platform;\n }\n combo = `obsidian v${appVersion} (installer: v${installerVersion}, platform: ${platform})`;\n } else { // fall back to SpecReporter behavior\n combo = this.getEnviromentCombo(runner.capabilities, undefined, runner.isMultiremote).trim()\n }\n \n // Spec file name and enviroment information\n const output = [`Running: ${combo}`]\n\n if ((runner.capabilities as any).sessionId) {\n output.push(`Session ID: ${(runner.capabilities as any).sessionId}`)\n }\n\n return output\n }\n}\n\n/**\n * Simple wrapper around `@wdio/spec-reporter` that prints the Obsidian version instead of the Chrome version.\n */\nexport default ObsidianReporter as Reporters.ReporterClass\n"],"mappings":";AAIA,OAAO,kBAAkB;AAIzB,IAAM,mBAAN,cAA+B,aAAa;AAAA,EACxC,YAAY,SAAc;AACtB,UAAM,EAAC,aAAa,OAAO,GAAG,QAAO,CAAC;AAAA,EAC1C;AAAA;AAAA,EAGA,iBAAiB,QAAqB;AAClC,UAAM,MAAO,OAAO,OAAe;AACnC,UAAM,kBAAkB,MAAM,sBAAsB;AAEpD,QAAI;AACJ,QAAI,iBAAiB;AACjB,YAAM,EAAC,YAAY,kBAAkB,cAAa,IAAI;AACtD,YAAM,iBAAiB,IAAI,gBAAgB,GAAG,kBAAkB,IAAI,uBAAuB;AAC3F,YAAM,WAAW,gBAAgB,kBAAkB,KAAK;AACxD,UAAI;AACJ,UAAI,UAAU;AACV,mBAAW;AAAA,MACf,WAAW,eAAe;AACtB,mBAAW;AAAA,MACf,OAAO;AACH,mBAAW,QAAQ;AAAA,MACvB;AACA,cAAQ,aAAa,UAAU,iBAAiB,gBAAgB,eAAe,QAAQ;AAAA,IAC3F,OAAO;AACH,cAAQ,KAAK,mBAAmB,OAAO,cAAc,QAAW,OAAO,aAAa,EAAE,KAAK;AAAA,IAC/F;AAGA,UAAM,SAAS,CAAC,YAAY,KAAK,EAAE;AAEnC,QAAK,OAAO,aAAqB,WAAW;AACxC,aAAO,KAAK,eAAgB,OAAO,aAAqB,SAAS,EAAE;AAAA,IACvE;AAEA,WAAO;AAAA,EACX;AACJ;AAKA,IAAO,gBAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wdio-obsidian-reporter",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Wrapper around @wdio/spec-reporter that displays Obsidian version info",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"obsidian",
|
|
@@ -32,18 +32,17 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://jesse-r-s-hines.github.io/wdio-obsidian-service/wdio-obsidian-reporter/README.html",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@types/node": "^18.
|
|
36
|
-
"@wdio/types": "^9.
|
|
35
|
+
"@types/node": "^18.19.121",
|
|
36
|
+
"@wdio/types": "^9.16.2",
|
|
37
37
|
"ts-node": "^10.9.2",
|
|
38
|
-
"tsup": "^8.
|
|
39
|
-
"tsx": "^4.
|
|
40
|
-
"typescript": "^5.8.
|
|
38
|
+
"tsup": "^8.5.0",
|
|
39
|
+
"tsx": "^4.20.3",
|
|
40
|
+
"typescript": "^5.8.3"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@wdio/reporter": "^9.
|
|
44
|
-
"@wdio/spec-reporter": "^9.
|
|
43
|
+
"@wdio/reporter": "^9.18.0",
|
|
44
|
+
"@wdio/spec-reporter": "^9.18.0"
|
|
45
45
|
},
|
|
46
|
-
"peerDependencies": {},
|
|
47
46
|
"engines": {
|
|
48
47
|
"node": ">=18"
|
|
49
48
|
}
|