@empiricalrun/test-gen 0.36.4 → 0.36.5
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 +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,
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|