@empiricalrun/test-gen 0.36.4 → 0.36.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.36.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 63f1398: fix: triggerHintsFlow trace span nesting
8
+ - Updated dependencies [42b4490]
9
+ - @empiricalrun/llm@0.9.24
10
+
11
+ ## 0.36.5
12
+
13
+ ### Patch Changes
14
+
15
+ - 32f1cb0: fix: do not skip teardown if test-gen is triggered for it
16
+
3
17
  ## 0.36.4
4
18
 
5
19
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/run.ts"],"names":[],"mappings":"AAmBA,KAAK,iBAAiB,GAAG;IACvB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CAAC,EAClD,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,GACjB,EAAE,iBAAiB,iBAyEnB"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/run.ts"],"names":[],"mappings":"AAmBA,KAAK,iBAAiB,GAAG;IACvB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CAAC,EAClD,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,GACjB,EAAE,iBAAiB,iBA+EnB"}
@@ -38,9 +38,13 @@ async function generateTestsUsingMasterAgent({ testFilePath, filePathToUpdate, p
38
38
  const pageVar = await (0, web_1.getPageVariableNameFromCreateTest)(testFilePath);
39
39
  console.log(`Detected playwright project name: ${project}`);
40
40
  // run playwright test which will internally run the master agent
41
+ const teardownFileRegex = /.*\.teardown\.ts/;
41
42
  const testsDirectory = `${process.cwd()}/tests`;
43
+ const isTestRunTriggeredForTeardown = teardownFileRegex.test(testFilePath);
42
44
  const teardowns = new utils_2.TeardownManager(testsDirectory);
43
- await teardowns.skipAll();
45
+ if (!isTestRunTriggeredForTeardown) {
46
+ await teardowns.skipAll();
47
+ }
44
48
  let command = `npx playwright test ${testFilePath} --retries 0 --project ${project} --timeout 0`;
45
49
  if (!process.env.CI) {
46
50
  command = command.concat(` --headed`);
@@ -62,7 +66,9 @@ async function generateTestsUsingMasterAgent({ testFilePath, filePathToUpdate, p
62
66
  console.error(error);
63
67
  isError = true;
64
68
  }
65
- teardowns.unskipAll();
69
+ if (!isTestRunTriggeredForTeardown) {
70
+ teardowns.unskipAll();
71
+ }
66
72
  // clean up the file if there is any error
67
73
  if (isError) {
68
74
  try {
@@ -246,7 +246,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, scope
246
246
  let shouldTriggerHintsFlow;
247
247
  let hintsExecutionCompletion;
248
248
  if (useHints) {
249
- const triggerHintsFlowSpan = trace?.span({
249
+ const triggerHintsFlowSpan = masterAgentActionSpan?.span({
250
250
  name: "trigger-hints-flow",
251
251
  input: {
252
252
  outputFromGetNextAction: output,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.36.4",
3
+ "version": "0.36.6",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -44,7 +44,7 @@
44
44
  "ts-morph": "^23.0.0",
45
45
  "tsx": "^4.16.2",
46
46
  "typescript": "^5.3.3",
47
- "@empiricalrun/llm": "^0.9.23",
47
+ "@empiricalrun/llm": "^0.9.24",
48
48
  "@empiricalrun/r2-uploader": "^0.3.6",
49
49
  "@empiricalrun/reporter": "^0.21.3"
50
50
  },