@empiricalrun/test-gen 0.52.7 → 0.52.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.52.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 40b4619: fix: update browser agent prompt for todo prep
8
+ - 7026a35: fix: missing package.json for cli launch
9
+
3
10
  ## 0.52.7
4
11
 
5
12
  ### Patch Changes
@@ -69,7 +69,7 @@ function printBanner() {
69
69
  {o,o}
70
70
  /)__)
71
71
  --"-"-`;
72
- const version = require("../../package.json").version;
72
+ const version = require("../../../package.json").version;
73
73
  const logLine1 = `Running test-gen v${version}`;
74
74
  const logLine2 = `from ${__dirname}`;
75
75
  // Process ASCII art
@@ -1 +1 @@
1
- {"version":3,"file":"test-gen-browser.d.ts","sourceRoot":"","sources":["../../src/tools/test-gen-browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AA0DnD,eAAO,MAAM,4BAA4B,EAAE,IA0E1C,CAAC"}
1
+ {"version":3,"file":"test-gen-browser.d.ts","sourceRoot":"","sources":["../../src/tools/test-gen-browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAwEnD,eAAO,MAAM,4BAA4B,EAAE,IA0E1C,CAAC"}
@@ -46,8 +46,22 @@ For the above file, the browser environment will execute the steps before the TO
46
46
  to the browser agent. The agent will do the actions described in the TODO comment and then resume control back to the
47
47
  test code.
48
48
 
49
- The browser agent will return a summary of actions that it took, and the generated Playwright code for them. You can
50
- then use the text editor tool to replace the TODO comment with the generated Playwright code.
49
+ Note that you CANNOT add TODO comments in the middle of a multi-line statement. This will break the tool.
50
+
51
+ For example, this is invalid:
52
+
53
+ \`\`\`
54
+ await extPage
55
+ .getByTestId("virtuoso-item-list")
56
+ // TODO(agent): Click on the STARS button
57
+ .getByText("STARS", { exact: true })
58
+ .click();
59
+ // This is invalid, because the TODO is in the middle of a multi-line statement
60
+ // Instead, add the TODO before or after the multi-line statement
61
+ \`\`\`
62
+
63
+ After execution, the browser agent will return a summary of actions that it took, and the generated Playwright code for them.
64
+ You can then use the text editor tool to replace the TODO comment with the generated Playwright code.
51
65
  `;
52
66
  exports.generateTestWithBrowserAgent = {
53
67
  schema: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.52.7",
3
+ "version": "0.52.8",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"