@browsermation/test 0.0.63-beta.15 → 0.0.63-beta.17

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.
@@ -14,6 +14,7 @@ export default class BrowsermationReporter implements Reporter {
14
14
  getLatestCommitMessage(): Promise<string>;
15
15
  gitRemoteOriginUrl(): Promise<string>;
16
16
  sendData(data: Record<string, any>): Promise<any>;
17
+ getProjectSuite(parent: Suite): Suite;
17
18
  /**
18
19
  * onBegin() is called once with a root suite that contains all other suites and tests. Learn more about suites hierarchy.
19
20
  *
package/dist/reporter.js CHANGED
@@ -143,6 +143,13 @@ var BrowsermationReporter = class {
143
143
  console.error("Error sending data to Browsermation:", error);
144
144
  }
145
145
  }
146
+ getProjectSuite(parent) {
147
+ let currentSuite = parent;
148
+ while (currentSuite.parent && currentSuite.type !== "project") {
149
+ currentSuite = currentSuite.parent;
150
+ }
151
+ return currentSuite;
152
+ }
146
153
  /**
147
154
  * onBegin() is called once with a root suite that contains all other suites and tests. Learn more about suites hierarchy.
148
155
  *
@@ -198,7 +205,8 @@ var BrowsermationReporter = class {
198
205
  cpus: (0, import_node_os.cpus)().length,
199
206
  project: test.parent.project.name,
200
207
  cpu_architecture: process.arch,
201
- retries: test.retries
208
+ retries: test.retries,
209
+ project_title: this.getProjectSuite(test.parent).title
202
210
  };
203
211
  this.log(`${JSON.stringify(data)}
204
212
  `);
@@ -209,6 +217,7 @@ var BrowsermationReporter = class {
209
217
  id: test.id,
210
218
  suite_run_id: this.suiteRunId,
211
219
  type: "test-end",
220
+ project: test.parent.project.name,
212
221
  title: test.title,
213
222
  title_path: test.titlePath,
214
223
  result: result.status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browsermation/test",
3
- "version": "0.0.63-beta.15",
3
+ "version": "0.0.63-beta.17",
4
4
  "description": "The testing platform for Playwright by Browsermation.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",