@browsermation/test 0.0.65 → 0.0.66

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.
Files changed (2) hide show
  1. package/dist/reporter.js +15 -9
  2. package/package.json +1 -1
package/dist/reporter.js CHANGED
@@ -159,21 +159,27 @@ var BrowsermationReporter = class {
159
159
  );
160
160
  return;
161
161
  }
162
+ if (process.env.BM_BROWSER_RUN_ID) {
163
+ data.browser_run_id = process.env.BM_BROWSER_RUN_ID;
164
+ }
162
165
  if (!this.apiToken) {
163
166
  this.log("API token not set. Skipping sending data to Browsermation.");
164
167
  return;
165
168
  }
166
169
  this.log(`Sending data to Browsermation: ${JSON.stringify(data)}`);
167
170
  try {
168
- const response = await fetch(this.browsermationURL, {
169
- method: "POST",
170
- headers: {
171
- Accept: "application/json",
172
- "Content-Type": "application/json",
173
- Authorization: `Bearer ${this.apiToken}`
174
- },
175
- body: JSON.stringify(data)
176
- });
171
+ const response = await fetch(
172
+ `${this.browsermationURL}?type=${data.type}`,
173
+ {
174
+ method: "POST",
175
+ headers: {
176
+ Accept: "application/json",
177
+ "Content-Type": "application/json",
178
+ Authorization: `Bearer ${this.apiToken}`
179
+ },
180
+ body: JSON.stringify(data)
181
+ }
182
+ );
177
183
  if (!response.ok) {
178
184
  this.log(
179
185
  `Failed to send data to Browsermation. Status: ${response.status} - ${response.statusText}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browsermation/test",
3
- "version": "0.0.65",
3
+ "version": "0.0.66",
4
4
  "description": "The testing platform for Playwright by Browsermation.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",