@empiricalrun/test-gen 0.38.47 → 0.38.49
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,17 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.38.49
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a25f06d: fix: repo editor not able to make changes to the method
|
|
8
|
+
|
|
9
|
+
## 0.38.48
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 3864b3d: fix: typos in repo edit prompt
|
|
14
|
+
|
|
3
15
|
## 0.38.47
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-edit.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/repo-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAcrD,wBAAsB,aAAa,CAAC,EAClC,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,
|
|
1
|
+
{"version":3,"file":"repo-edit.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/repo-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAcrD,wBAAsB,aAAa,CAAC,EAClC,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,iBA+JA"}
|
|
@@ -50,24 +50,24 @@ async function repoEditAgent({ trace, task, }) {
|
|
|
50
50
|
{
|
|
51
51
|
role: "system",
|
|
52
52
|
content: `
|
|
53
|
-
You are a software test engineer who is given a task to update code in a Playwright repository.
|
|
53
|
+
You are a software test engineer who is given a task to update code in a Playwright test repository.
|
|
54
54
|
You will be provided with current test files, fixtures and page object models for you to use and update code as per the task provided to you.
|
|
55
55
|
You need to respond with file path and updated code block inside the file.
|
|
56
56
|
|
|
57
57
|
Directory structure for the repository:
|
|
58
58
|
└── /
|
|
59
59
|
├── tests/
|
|
60
|
-
|
|
61
|
-
│
|
|
60
|
+
├────test-data/
|
|
61
|
+
│ └── index.ts
|
|
62
62
|
├── pages/
|
|
63
63
|
├── playwright.config.ts
|
|
64
|
-
├──
|
|
64
|
+
├── app_knowledge.md
|
|
65
65
|
├── .eslintrc.js
|
|
66
66
|
├── package.json
|
|
67
67
|
└── tsconfig.json
|
|
68
68
|
|
|
69
69
|
Explanation of repository structure:
|
|
70
|
-
- tests: this is a directory where all tests and fixtures are kept.
|
|
70
|
+
- tests: this is a directory where all tests and fixtures are kept. All spec files here end with ".spec.ts" as naming convention. There is an exception for Playwright fixtures file. Fixtures file is named as "fixtures.ts"
|
|
71
71
|
- test-data: this is a directory where all the test data are kept.
|
|
72
72
|
- pages: this is a directory where all reusable page object model methods are kept. Page object model methods are written in a pure functional convention. These methods are reusable methods created to be used across tests. This is also a directory where all the utility methods are kept which can be executed independent of the Playwright tests.
|
|
73
73
|
|
|
@@ -166,7 +166,6 @@ Task: ${task}
|
|
|
166
166
|
fileChanges: updatedFileChanges,
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
// TODO: identify new file updates
|
|
170
169
|
const newFileUpdates = updates.filter((f) => !fsSync.existsSync(f.filePath));
|
|
171
170
|
await Promise.all(newFileUpdates.map((f) => {
|
|
172
171
|
return (async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-update-feedback.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/test-update-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAKxE,wBAAsB,wBAAwB,CAAC,EAC7C,KAAK,EACL,SAAS,EACT,SAAS,EACT,aAAa,GACd,EAAE;IACD,SAAS,EAAE,0BAA0B,EAAE,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B,YAAY,EAAE,MAAM,CAAC;KACtB,EAAE,CAAC;IACJ,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;;;;;
|
|
1
|
+
{"version":3,"file":"test-update-feedback.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/test-update-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAKxE,wBAAsB,wBAAwB,CAAC,EAC7C,KAAK,EACL,SAAS,EACT,SAAS,EACT,aAAa,GACd,EAAE;IACD,SAAS,EAAE,0BAA0B,EAAE,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B,YAAY,EAAE,MAAM,CAAC;KACtB,EAAE,CAAC;IACJ,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;;;;;KA4CA"}
|
|
@@ -7,6 +7,11 @@ const utils_1 = require("./utils");
|
|
|
7
7
|
async function applyTestUpdateFeedbacks({ trace, oldPrompt, feedbacks, agentResponse, }) {
|
|
8
8
|
const applyTestUpdateFeedbacksSpan = trace?.span({
|
|
9
9
|
name: "apply-test-update-feedbacks",
|
|
10
|
+
input: {
|
|
11
|
+
oldPrompt,
|
|
12
|
+
feedbacks,
|
|
13
|
+
agentResponse,
|
|
14
|
+
},
|
|
10
15
|
});
|
|
11
16
|
const llm = new llm_1.LLM({
|
|
12
17
|
trace: applyTestUpdateFeedbacksSpan,
|
|
@@ -38,8 +43,8 @@ Fix the above failures and respond with same format as the previous response`,
|
|
|
38
43
|
});
|
|
39
44
|
const updatedResponse = response?.content || "";
|
|
40
45
|
const fileChanges = (0, utils_1.extractTestUpdates)(updatedResponse);
|
|
41
|
-
const filteredFileChanges = fileChanges.filter((f) =>
|
|
42
|
-
applyTestUpdateFeedbacksSpan?.end({ output: {
|
|
46
|
+
const filteredFileChanges = fileChanges.filter((f) => feedbacks.some((e) => e?.filePath === f.filePath));
|
|
47
|
+
applyTestUpdateFeedbacksSpan?.end({ output: { fileChanges } });
|
|
43
48
|
return filteredFileChanges;
|
|
44
49
|
}
|
|
45
50
|
exports.applyTestUpdateFeedbacks = applyTestUpdateFeedbacks;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.49",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"tsx": "^4.16.2",
|
|
73
73
|
"typescript": "^5.3.3",
|
|
74
74
|
"@empiricalrun/llm": "^0.9.28",
|
|
75
|
-
"@empiricalrun/
|
|
76
|
-
"@empiricalrun/
|
|
75
|
+
"@empiricalrun/r2-uploader": "^0.3.7",
|
|
76
|
+
"@empiricalrun/reporter": "^0.21.6"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/detect-port": "^1.3.5",
|