@empiricalrun/test-gen 0.10.0 → 0.10.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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/run.ts"],"names":[],"mappings":"AAOA,wBAAsB,+BAA+B,CAAC,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/run.ts"],"names":[],"mappings":"AAOA,wBAAsB,+BAA+B,CAAC,YAAY,EAAE,MAAM,iBAsBzE"}
|
|
@@ -14,25 +14,22 @@ async function generateTestsUsingBrowsingAgent(testFilePath) {
|
|
|
14
14
|
const port = await (0, detect_port_1.default)(3030);
|
|
15
15
|
const fileService = new server_1.FileService({ port });
|
|
16
16
|
await fileService.startFileService();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
command.push(`--headed`);
|
|
24
|
-
}
|
|
25
|
-
await (0, exec_1.cmd)(command, {
|
|
26
|
-
env: {
|
|
27
|
-
APP_PORT: port.toString(),
|
|
28
|
-
PW_TEST_HTML_REPORT_OPEN: "never",
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
await (0, web_1.removeTestOnly)(testFilePath);
|
|
17
|
+
fileService.setFilePath(testFilePath);
|
|
18
|
+
//TODO: change this to per test
|
|
19
|
+
//TODO: support multiple projects (browsers)
|
|
20
|
+
let command = `npx playwright test ${testFilePath} --retries 0`;
|
|
21
|
+
if (!process.env.CI) {
|
|
22
|
+
command = command.concat(` --headed`);
|
|
32
23
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
const exitCode = await (0, exec_1.cmd)(command.split(" "), {
|
|
25
|
+
env: {
|
|
26
|
+
APP_PORT: port.toString(),
|
|
27
|
+
PW_TEST_HTML_REPORT_OPEN: "never",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
if (exitCode != 0) {
|
|
31
|
+
process.exit(exitCode);
|
|
36
32
|
}
|
|
33
|
+
await (0, web_1.removeTestOnly)(testFilePath);
|
|
37
34
|
}
|
|
38
35
|
exports.generateTestsUsingBrowsingAgent = generateTestsUsingBrowsingAgent;
|
package/dist/utils/exec.d.ts
CHANGED
package/dist/utils/exec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":"AAGA,wBAAgB,GAAG,CACjB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GACxC,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":"AAGA,wBAAgB,GAAG,CACjB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,GACxC,OAAO,CAAC,MAAM,CAAC,CAejB"}
|