@empiricalrun/test-gen 0.48.0 → 0.48.1
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 +9 -0
- package/dist/agent/browsing/utils.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.48.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 13e3048: fix: add semi colon to terminate createTest line
|
|
8
|
+
- b7092d0: fix: project detection should normalize paths
|
|
9
|
+
- Updated dependencies [a2609f5]
|
|
10
|
+
- @empiricalrun/llm@0.10.1
|
|
11
|
+
|
|
3
12
|
## 0.48.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -92,7 +92,7 @@ async function replaceTodoWithCreateTest({ testFilePath, testCaseName, testCaseS
|
|
|
92
92
|
// This method is an alternative to prepareFileForUpdateScenario
|
|
93
93
|
// TODO: Does not support multiple pages, scoped variables, updates in POM files
|
|
94
94
|
const fileContent = await fs_extra_1.default.readFile(testFilePath, "utf-8");
|
|
95
|
-
await fs_extra_1.default.writeFile(testFilePath, fileContent.replace(/\/\/ TODO\(agent\): (.*)/, (_, todoText) => `await createTest("${todoText.replace(/"/g, '\\"')}", page)
|
|
95
|
+
await fs_extra_1.default.writeFile(testFilePath, fileContent.replace(/\/\/ TODO\(agent\): (.*)/, (_, todoText) => `await createTest("${todoText.replace(/"/g, '\\"')}", page);`));
|
|
96
96
|
await addImportForCreateTest(testFilePath);
|
|
97
97
|
await markTestAsOnly({
|
|
98
98
|
testCaseName,
|
|
@@ -309,7 +309,7 @@ function matchAgainstPattern(pattern, filePathToTest) {
|
|
|
309
309
|
* @returns
|
|
310
310
|
*/
|
|
311
311
|
async function detectProjectName(testFilePath, playwrightConfig, pwProjectsFilter = ["*"]) {
|
|
312
|
-
const filePath = testFilePath.replace("
|
|
312
|
+
const filePath = path_1.default.normalize(testFilePath).replace("tests/", "");
|
|
313
313
|
if (!playwrightConfig.projects || playwrightConfig.projects.length === 0) {
|
|
314
314
|
throw new Error(`No projects found in playwright config.`);
|
|
315
315
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"ts-morph": "^23.0.0",
|
|
74
74
|
"tsx": "^4.16.2",
|
|
75
75
|
"typescript": "^5.3.3",
|
|
76
|
-
"@empiricalrun/llm": "^0.10.
|
|
76
|
+
"@empiricalrun/llm": "^0.10.1",
|
|
77
77
|
"@empiricalrun/r2-uploader": "^0.3.8",
|
|
78
78
|
"@empiricalrun/reporter": "^0.23.1",
|
|
79
79
|
"@empiricalrun/test-run": "^0.7.2"
|