@empiricalrun/test-gen 0.46.7 → 0.46.8

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 (48) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/actions/skill.d.ts.map +1 -1
  3. package/dist/actions/skill.js +3 -4
  4. package/dist/agent/browsing/index.d.ts +1 -8
  5. package/dist/agent/browsing/index.d.ts.map +1 -1
  6. package/dist/agent/browsing/index.js +2 -4
  7. package/dist/agent/codegen/skills-retriever.d.ts.map +1 -1
  8. package/dist/agent/codegen/skills-retriever.js +7 -34
  9. package/dist/agent/codegen/utils.d.ts.map +1 -1
  10. package/dist/agent/codegen/utils.js +20 -9
  11. package/dist/agent/master/action-tool-calls.d.ts +3 -1
  12. package/dist/agent/master/action-tool-calls.d.ts.map +1 -1
  13. package/dist/agent/master/action-tool-calls.js +41 -38
  14. package/dist/agent/master/browser-tests/fixtures.d.ts +9 -0
  15. package/dist/agent/master/browser-tests/fixtures.d.ts.map +1 -0
  16. package/dist/agent/master/browser-tests/fixtures.js +33 -0
  17. package/dist/agent/master/browser-tests/index.spec.js +42 -50
  18. package/dist/agent/master/browser-tests/skills.spec.d.ts +2 -0
  19. package/dist/agent/master/browser-tests/skills.spec.d.ts.map +1 -0
  20. package/dist/agent/master/browser-tests/skills.spec.js +107 -0
  21. package/dist/agent/master/element-annotation.d.ts +3 -4
  22. package/dist/agent/master/element-annotation.d.ts.map +1 -1
  23. package/dist/agent/master/element-annotation.js +2 -2
  24. package/dist/agent/master/execute-browser-action.d.ts +19 -0
  25. package/dist/agent/master/execute-browser-action.d.ts.map +1 -0
  26. package/dist/agent/master/execute-browser-action.js +123 -0
  27. package/dist/agent/master/execute-skill-action.d.ts +11 -0
  28. package/dist/agent/master/execute-skill-action.d.ts.map +1 -0
  29. package/dist/agent/master/execute-skill-action.js +25 -0
  30. package/dist/agent/master/next-action.d.ts +5 -8
  31. package/dist/agent/master/next-action.d.ts.map +1 -1
  32. package/dist/agent/master/next-action.js +11 -91
  33. package/dist/agent/master/run.d.ts +2 -3
  34. package/dist/agent/master/run.d.ts.map +1 -1
  35. package/dist/agent/master/run.js +34 -131
  36. package/dist/agent/master/scroller.d.ts +1 -1
  37. package/dist/agent/master/scroller.d.ts.map +1 -1
  38. package/dist/agent/master/scroller.js +0 -1
  39. package/dist/evals/master-agent.evals.d.ts.map +1 -1
  40. package/dist/evals/master-agent.evals.js +1 -4
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +0 -5
  43. package/dist/page/index.d.ts +1 -1
  44. package/dist/page/index.d.ts.map +1 -1
  45. package/dist/utils/env.d.ts.map +1 -1
  46. package/dist/utils/env.js +3 -1
  47. package/package.json +1 -1
  48. package/playwright.config.ts +1 -1
@@ -8,21 +8,18 @@ const utils_1 = require("../../actions/utils");
8
8
  const logger_1 = require("../../bin/logger");
9
9
  const constants_1 = require("../../constants");
10
10
  const errors_1 = require("../../errors");
11
- const human_in_the_loop_1 = require("../../human-in-the-loop");
12
11
  const page_1 = require("../../page");
13
12
  const reporter_1 = require("../../reporter");
14
13
  const session_1 = require("../../session");
15
- const env_1 = require("../../utils/env");
16
- const browsing_1 = require("../browsing");
17
14
  const utils_2 = require("../browsing/utils");
18
15
  const skills_retriever_1 = require("../codegen/skills-retriever");
19
16
  const run_1 = require("../planner/run");
20
17
  const run_time_planner_1 = require("../planner/run-time-planner");
21
18
  const utils_3 = require("../utils");
22
19
  const action_tool_calls_1 = require("./action-tool-calls");
23
- const element_annotation_1 = require("./element-annotation");
20
+ const execute_browser_action_1 = require("./execute-browser-action");
21
+ const execute_skill_action_1 = require("./execute-skill-action");
24
22
  const next_action_1 = require("./next-action");
25
- const with_hints_1 = require("./with-hints");
26
23
  const MAX_ERROR_COUNT = 2;
27
24
  function getPageVariables(stateVariables) {
28
25
  const keys = Object.keys(stateVariables);
@@ -110,13 +107,12 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
110
107
  failedActions,
111
108
  },
112
109
  });
113
- // Provides a plan to master agent to execute, also verifies whether task is done or not
114
110
  const plannerResp = await (0, run_time_planner_1.runtimePlanner)({
115
111
  trace: masterAgentSpan,
116
112
  task,
117
113
  successfulActions: [...masterAgentActions],
118
114
  pages: getPageVariables(actions.getStateVariables()),
119
- currentPage: (0, utils_1.getPageVarName)(),
115
+ currentPage: testGenPage.name,
120
116
  });
121
117
  isGivenTaskDone = plannerResp.isDone;
122
118
  if (isGivenTaskDone) {
@@ -131,9 +127,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
131
127
  }
132
128
  // inject scripts in the page
133
129
  await (0, utils_2.injectPwLocatorGenerator)(testGenPage.pwPageInstance);
134
- const buffer = await page.screenshot({
135
- // path: `screenshots/screenshot-${screenshotIndex++}.png`, // enable this and screenshotIndex var for local debugging
136
- });
130
+ const buffer = await page.screenshot();
137
131
  const testGenReporter = new reporter_1.TestGenUpdatesReporter();
138
132
  await testGenReporter.sendCurrentView(buffer);
139
133
  const pageScreenshot = buffer.toString("base64");
@@ -143,31 +137,29 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
143
137
  break;
144
138
  }
145
139
  // Provides next action that needs to be taken
146
- const toolCall = await (0, next_action_1.getNextAction)({
140
+ const nextAction = await (0, next_action_1.getNextAction)({
141
+ page,
142
+ pageScreenshot: [pageScreenshot],
147
143
  task,
148
144
  executedActions: masterAgentActions,
149
145
  failedActions,
150
- pageUrl: page.url(),
151
146
  trace: masterAgentSpan,
152
147
  llm,
153
148
  options,
154
- pageScreenshot: [pageScreenshot],
155
149
  actions,
156
- actionTypes: action_tool_calls_1.ActionType,
157
150
  disableSkills,
158
- page,
159
151
  logger,
160
152
  });
161
153
  if (await (0, session_1.shouldStopSession)()) {
162
154
  break;
163
155
  }
164
- if (toolCall) {
165
- if (toolCall.actionType === "unknown") {
156
+ if (nextAction) {
157
+ if (nextAction.actionType === action_tool_calls_1.ActionType.UNKNOWN) {
166
158
  logger.error("Agent is not able to figure out next action since element is not visible on screen.");
167
159
  await testgenUpdatesReporter.sendMessage("Agent is not able to figure out next action since element is not visible on screen.");
168
160
  break;
169
161
  }
170
- const args = (0, utils_3.parseJson)(toolCall.toolCallArgs);
162
+ const args = (0, utils_3.parseJson)(nextAction.toolCallArgs);
171
163
  const masterAgentActionSpan = masterAgentSpan?.span({
172
164
  name: "master-agent-execute-action",
173
165
  });
@@ -178,124 +170,35 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
178
170
  try {
179
171
  void testGenReporter.sendMessage(output.reason);
180
172
  logger.log(`Next Action: ${output.action}`);
181
- if (toolCall.actionType === skill_1.SKILL_USAGE) {
182
- if (!(0, env_1.isRunningOnCloud)()) {
183
- const { skillDetails } = (0, skill_1.extractSkillFromArgs)(args);
184
- const feedback = await human_in_the_loop_1.humanLoop.getFeedback({
185
- message: `Should I use this skill?\n\n${skillDetails?.usageExample}\n\nfrom: ${skillDetails?.filePath}\n\nAnswer with "yes" or "no"`,
173
+ switch (nextAction.actionType) {
174
+ case skill_1.SKILL_USAGE: {
175
+ const code = await (0, execute_skill_action_1.executeSkillAction)({
176
+ actions,
177
+ nextAction,
178
+ trace: masterAgentActionSpan,
186
179
  });
187
- if (feedback.toLowerCase().trim().includes("no")) {
188
- throw new errors_1.HumanApprovalDenied("Skill usage approval not provided");
180
+ if (code) {
181
+ generatedCodeSteps.push(code);
189
182
  }
183
+ break;
190
184
  }
191
- const code = await actions.executeAction(toolCall.actionType, args, masterAgentActionSpan);
192
- if (code) {
193
- generatedCodeSteps.push(code);
194
- }
195
- }
196
- else {
197
- let shouldTriggerHintsFlow;
198
- let hintsExecutionCompletion;
199
- let elementAnnotation;
200
- const actionType = toolCall.actionType;
201
- let preference = {
202
- actionType: "all",
203
- };
204
- if (useActionSpecificAnnotations && (0, action_tool_calls_1.isValidActionType)(actionType)) {
205
- switch (actionType) {
206
- case action_tool_calls_1.ActionType.FILL:
207
- preference = {
208
- actionType: action_tool_calls_1.ActionType.FILL,
209
- };
210
- break;
211
- case action_tool_calls_1.ActionType.ASSERT_TEXT:
212
- preference = {
213
- actionType: action_tool_calls_1.ActionType.ASSERT_TEXT,
214
- assertionText: args.assertion_text,
215
- };
216
- break;
217
- default:
218
- preference = {
219
- actionType: "all",
220
- };
221
- }
185
+ case action_tool_calls_1.ActionType.OBSERVATION: {
186
+ output.action = args.observation;
187
+ logger.log("Observation: ", output.action);
188
+ break;
222
189
  }
223
- let { annotationKeys, annotatedPageScreenshot, annotationBuffer } = await (0, element_annotation_1.getAnnotationKeys)({
224
- page,
225
- preference,
226
- options,
227
- trace: masterAgentActionSpan,
228
- });
229
- if (annotationKeys.length > 0) {
230
- // TODO: this string has newline characters that makes it harder to read
231
- const annotationMapString = annotationKeys
232
- ?.map((a) => `${a.elementID}: ${a.text}`)
233
- .join("\n");
234
- // Provides the annotations for all the element present on screen
235
- // Also provides the annotation of element on which the action needs to be taken
236
- elementAnnotation = await (0, element_annotation_1.getElementAnnotation)({
237
- elementDescription: args.element_description,
238
- annotations: annotationMapString,
239
- annotatedScreenshot: annotatedPageScreenshot,
240
- trace: masterAgentActionSpan,
241
- llm,
242
- preference,
243
- });
244
- output.elementAnnotation = elementAnnotation;
245
- console.log("Output: ", output);
246
- await testGenReporter.sendCurrentView(annotationBuffer);
247
- const triggerHintsFlowSpan = masterAgentActionSpan?.span({
248
- name: "trigger-hints-flow",
249
- input: {
250
- outputFromGetNextAction: output,
251
- generatedAnnotations: annotationKeys,
190
+ default: {
191
+ const { generatedCodeSteps: codeFromExecuteAction } = await (0, execute_browser_action_1.executeBrowserAction)({
192
+ page,
193
+ nextAction,
194
+ flags: {
195
+ useActionSpecificAnnotations,
252
196
  },
253
- });
254
- // Provides the action whether its a click, fill etc.
255
- const result = await (0, with_hints_1.triggerHintsFlow)({
256
- outputFromGetNextAction: output,
257
- generatedAnnotations: annotationKeys,
258
197
  actions,
259
198
  llm,
260
- trace: triggerHintsFlowSpan,
261
- });
262
- shouldTriggerHintsFlow = result.shouldTriggerHintsFlow;
263
- hintsExecutionCompletion = result.hintsExecutionCompletion;
264
- triggerHintsFlowSpan?.end({
265
- output: result,
266
- });
267
- }
268
- if (shouldTriggerHintsFlow && hintsExecutionCompletion) {
269
- const toolCalls = hintsExecutionCompletion?.tool_calls || [];
270
- for (const i in toolCalls) {
271
- const currentToolCall = toolCalls[i];
272
- const code = await actions.executeAction(currentToolCall.function.name, {
273
- ...JSON.parse(currentToolCall.function.arguments),
274
- elementAnnotation,
275
- }, masterAgentActionSpan);
276
- if (code) {
277
- generatedCodeSteps.push(code);
278
- }
279
- }
280
- if (actions.isStuckInLoop()) {
281
- throw new Error("Agent is not able to figure out next action when using hints");
282
- }
283
- }
284
- else {
285
- const browserAction = await (0, browsing_1.executeTaskUsingBrowsingAgent)({
286
199
  trace: masterAgentActionSpan,
287
- action: output.action,
288
- page,
289
- options,
290
- llm,
291
- actions,
292
200
  });
293
- if (browserAction) {
294
- output.action = browserAction.action;
295
- if (browserAction.code) {
296
- generatedCodeSteps.push(browserAction.code);
297
- }
298
- }
201
+ generatedCodeSteps.push(...codeFromExecuteAction);
299
202
  }
300
203
  }
301
204
  // resetting error count as there is a successful action
@@ -305,7 +208,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
305
208
  input: {
306
209
  action: output.action,
307
210
  reason: output.reason,
308
- type: toolCall.actionType,
211
+ type: nextAction.actionType,
309
212
  },
310
213
  output: {
311
214
  success: true,
@@ -315,7 +218,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
315
218
  disableSkills = false;
316
219
  }
317
220
  catch (e) {
318
- if (toolCall.actionType === skill_1.SKILL_USAGE) {
221
+ if (nextAction.actionType === skill_1.SKILL_USAGE) {
319
222
  logger.log("Disabling skill usage for next retry");
320
223
  disableSkills = true;
321
224
  }
@@ -323,7 +226,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
323
226
  input: {
324
227
  action: output.action,
325
228
  reason: output.reason,
326
- type: toolCall.actionType,
229
+ type: nextAction.actionType,
327
230
  },
328
231
  output: {
329
232
  error: true,
@@ -331,7 +234,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
331
234
  },
332
235
  });
333
236
  if (!(e instanceof errors_1.HumanApprovalDenied)) {
334
- logger.error("Failed to run master agent's next task", JSON.stringify(toolCall, null, 2), e);
237
+ logger.error("Failed to run master agent's next task", JSON.stringify(nextAction, null, 2), e);
335
238
  failedActions.push(output.action);
336
239
  if (failedActions.length >= MAX_ERROR_COUNT) {
337
240
  const error = "Agent is not able to figure out next action, marking task as done";
@@ -1,5 +1,5 @@
1
1
  import { TraceClient } from "@empiricalrun/llm";
2
- import { Page } from "playwright";
2
+ import type { Page } from "@playwright/test";
3
3
  import { CustomLogger } from "../../bin/logger";
4
4
  export type FrameReference = {
5
5
  scrollPosition: number;
@@ -1 +1 @@
1
- {"version":3,"file":"scroller.d.ts","sourceRoot":"","sources":["../../../src/agent/master/scroller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAchD,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AA4ZF,wBAAsB,QAAQ,CAAC,EAC7B,kBAAkB,EAClB,IAAI,EACJ,KAAK,EACL,cAAc,EACd,MAAM,GACP,EAAE;IACD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CA6D5B"}
1
+ {"version":3,"file":"scroller.d.ts","sourceRoot":"","sources":["../../../src/agent/master/scroller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAchD,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AA2ZF,wBAAsB,QAAQ,CAAC,EAC7B,kBAAkB,EAClB,IAAI,EACJ,KAAK,EACL,cAAc,EACd,MAAM,GACP,EAAE;IACD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CA6D5B"}
@@ -187,7 +187,6 @@ async function getDivAnnotationToScrollOn({ elementDescription, page, trace, log
187
187
  preference: {
188
188
  actionType: action_tool_calls_1.ActionType.SCROLL,
189
189
  },
190
- options: {},
191
190
  trace,
192
191
  });
193
192
  // Remove the used annotations from the list
@@ -1 +1 @@
1
- {"version":3,"file":"master-agent.evals.d.ts","sourceRoot":"","sources":["../../src/evals/master-agent.evals.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,4BAA4B,EAAE,UAwC1C,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
1
+ {"version":3,"file":"master-agent.evals.d.ts","sourceRoot":"","sources":["../../src/evals/master-agent.evals.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,4BAA4B,EAAE,UAoC1C,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.masterGetNextActionEvaluator = void 0;
4
4
  const actions_1 = require("../actions");
5
5
  const skill_1 = require("../actions/skill");
6
- const action_tool_calls_1 = require("../agent/master/action-tool-calls");
7
6
  const next_action_1 = require("../agent/master/next-action");
8
7
  const page_1 = require("../page");
9
8
  const masterGetNextActionEvaluator = async ({ item, trace, }) => {
10
- const { task, executedActions, failedActions, pageUrl, options, pageScreenshot, disableSkills, skills = [], } = item.input;
9
+ const { task, executedActions, failedActions, options, pageScreenshot, disableSkills, skills = [], } = item.input;
11
10
  const page = {};
12
11
  skill_1.testCaseSkills.updateSkills(skills);
13
12
  const actions = new actions_1.PlaywrightActions(new page_1.TestGenPage(page, "page"));
@@ -15,12 +14,10 @@ const masterGetNextActionEvaluator = async ({ item, trace, }) => {
15
14
  task,
16
15
  executedActions,
17
16
  failedActions,
18
- pageUrl,
19
17
  trace,
20
18
  options,
21
19
  pageScreenshot,
22
20
  actions,
23
- actionTypes: action_tool_calls_1.ActionType,
24
21
  disableSkills,
25
22
  page,
26
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAOlC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAYpC,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,SAAS,iBAsC3E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAOlC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAYpC,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,SAAS,iBAiC3E"}
package/dist/index.js CHANGED
@@ -40,11 +40,6 @@ async function createTest(task, page, scope) {
40
40
  page,
41
41
  task,
42
42
  options: {
43
- htmlSanitize: {
44
- disallowedStrings: [
45
- "v-data-table__td v-data-table-column--align-start",
46
- ],
47
- },
48
43
  ...testGenConfig.options,
49
44
  },
50
45
  scopeVars: scope,
@@ -1,4 +1,4 @@
1
- import { Page } from "playwright";
1
+ import type { Page } from "playwright";
2
2
  export declare class TestGenPage {
3
3
  pwPageInstance: Page;
4
4
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,qBAAa,WAAW;IAEb,cAAc,EAAE,IAAI;IACpB,IAAI,EAAE,MAAM;gBADZ,cAAc,EAAE,IAAI,EACpB,IAAI,EAAE,MAAM;IAGrB,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAIxD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/page/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,qBAAa,WAAW;IAEb,cAAc,EAAE,IAAI;IACpB,IAAI,EAAE,MAAM;gBADZ,cAAc,EAAE,IAAI,EACpB,IAAI,EAAE,MAAM;IAGrB,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAIxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,YAE/B"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/utils/env.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,YAM/B"}
package/dist/utils/env.js CHANGED
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isRunningOnCloud = void 0;
4
4
  function isRunningOnCloud() {
5
- return process.env.CI === "true";
5
+ return (process.env.CI === "true" ||
6
+ // eslint-disable-next-line turbo/no-undeclared-env-vars
7
+ !!process.env.RUNNING_BROWSER_TESTS_FOR_TEST_GEN);
6
8
  }
7
9
  exports.isRunningOnCloud = isRunningOnCloud;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.46.7",
3
+ "version": "0.46.8",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -8,7 +8,7 @@ export default defineConfig({
8
8
  testDir: "./dist/.",
9
9
  testMatch: "**/*.spec.js",
10
10
  // Setting large timeout as master agent takes time to run.
11
- timeout: 240_000,
11
+ timeout: 300_000,
12
12
  fullyParallel: true,
13
13
  workers: "50%",
14
14
  use: {