@empiricalrun/test-gen 0.38.51 → 0.38.53
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 +14 -0
- package/dist/agent/master/next-action.d.ts +1 -2
- package/dist/agent/master/next-action.d.ts.map +1 -1
- package/dist/agent/master/next-action.js +1 -2
- package/dist/agent/master/run.d.ts.map +1 -1
- package/dist/agent/master/run.js +69 -73
- package/dist/evals/master-agent.evals.d.ts.map +1 -1
- package/dist/evals/master-agent.evals.js +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/pw-test.d.ts +3 -0
- package/dist/utils/pw-test.d.ts.map +1 -0
- package/dist/utils/pw-test.js +25 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.38.53
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1f87882: fix: remove selector hints flag from UI and enable it by default
|
|
8
|
+
|
|
9
|
+
## 0.38.52
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f4d894d: fix: remove playwright dependency from test-gen
|
|
14
|
+
- Updated dependencies [f4d894d]
|
|
15
|
+
- @empiricalrun/llm@0.9.29
|
|
16
|
+
|
|
3
17
|
## 0.38.51
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LLM, TraceClient } from "@empiricalrun/llm";
|
|
2
2
|
import { PlaywrightActions } from "../../actions";
|
|
3
3
|
import { BrowsingAgentOptions } from "../browsing";
|
|
4
|
-
export declare function getNextAction({ task, executedActions, failedActions, pageUrl, trace, llm, options, pageScreenshot, actions, disableSkills,
|
|
4
|
+
export declare function getNextAction({ task, executedActions, failedActions, pageUrl, trace, llm, options, pageScreenshot, actions, disableSkills, }: {
|
|
5
5
|
task: string;
|
|
6
6
|
executedActions: string[];
|
|
7
7
|
failedActions: any[];
|
|
@@ -13,7 +13,6 @@ export declare function getNextAction({ task, executedActions, failedActions, pa
|
|
|
13
13
|
annotatedPageScreenshot?: string;
|
|
14
14
|
actions: PlaywrightActions;
|
|
15
15
|
disableSkills: boolean;
|
|
16
|
-
useHints: boolean;
|
|
17
16
|
annotations?: string[];
|
|
18
17
|
}): Promise<import("openai/resources/index.mjs").ChatCompletionMessageToolCall | undefined>;
|
|
19
18
|
//# sourceMappingURL=next-action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../../src/agent/master/next-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAOlD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAsB,aAAa,CAAC,EAClC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,OAAO,EACP,KAAK,EACL,GAAG,EACH,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,
|
|
1
|
+
{"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../../src/agent/master/next-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAOlD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAsB,aAAa,CAAC,EAClC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,OAAO,EACP,KAAK,EACL,GAAG,EACH,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,GACd,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,2FAiKA"}
|
|
@@ -5,7 +5,7 @@ const llm_1 = require("@empiricalrun/llm");
|
|
|
5
5
|
const vision_1 = require("@empiricalrun/llm/vision");
|
|
6
6
|
const skill_1 = require("../../actions/skill");
|
|
7
7
|
const constants_1 = require("../../constants");
|
|
8
|
-
async function getNextAction({ task, executedActions, failedActions, pageUrl, trace, llm, options, pageScreenshot, actions, disableSkills,
|
|
8
|
+
async function getNextAction({ task, executedActions, failedActions, pageUrl, trace, llm, options, pageScreenshot, actions, disableSkills, }) {
|
|
9
9
|
const nextActionSpan = trace?.span({
|
|
10
10
|
name: "master-agent-next-action",
|
|
11
11
|
input: {
|
|
@@ -16,7 +16,6 @@ async function getNextAction({ task, executedActions, failedActions, pageUrl, tr
|
|
|
16
16
|
options,
|
|
17
17
|
pageScreenshot,
|
|
18
18
|
disableSkills,
|
|
19
|
-
useHints,
|
|
20
19
|
skills: skill_1.testCaseSkills.getAvailableSkills(),
|
|
21
20
|
},
|
|
22
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAclC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,oBAAoB,EAErB,MAAM,aAAa,CAAC;AAsBrB,wBAAsB,0BAA0B,CAAC,EAC/C,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;;;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAclC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,oBAAoB,EAErB,MAAM,aAAa,CAAC;AAsBrB,wBAAsB,0BAA0B,CAAC,EAC/C,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;;;GAwVA"}
|
package/dist/agent/master/run.js
CHANGED
|
@@ -28,7 +28,6 @@ function getPageVariables(stateVariables) {
|
|
|
28
28
|
return pages;
|
|
29
29
|
}
|
|
30
30
|
async function createTestUsingMasterAgent({ task, page, testCase, options, scopeVars, }) {
|
|
31
|
-
const useHints = options?.useHints || false;
|
|
32
31
|
const logger = new logger_1.CustomLogger({ useReporter: false });
|
|
33
32
|
const testgenUpdatesReporter = new reporter_1.TestGenUpdatesReporter();
|
|
34
33
|
const session = (0, session_1.getSessionDetails)();
|
|
@@ -136,7 +135,6 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, scope
|
|
|
136
135
|
pageScreenshot,
|
|
137
136
|
actions,
|
|
138
137
|
disableSkills,
|
|
139
|
-
useHints,
|
|
140
138
|
});
|
|
141
139
|
if (await (0, session_1.shouldStopSession)()) {
|
|
142
140
|
break;
|
|
@@ -165,82 +163,80 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, scope
|
|
|
165
163
|
let hintsExecutionCompletion;
|
|
166
164
|
let annotationKeys = [];
|
|
167
165
|
let elementAnnotation;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
166
|
+
await page.waitForTimeout(2000);
|
|
167
|
+
annotationKeys = await page.evaluate((options) => {
|
|
168
|
+
// @ts-ignore
|
|
169
|
+
// eslint-disable-next-line no-undef
|
|
170
|
+
window.annotationInstance = annotateClickableElements(options);
|
|
171
|
+
const annotations = Object.entries(
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
window.annotationInstance.annotations).map(([key, value]) => ({
|
|
174
|
+
elementID: key,
|
|
175
|
+
text:
|
|
176
|
+
//@ts-ignore
|
|
177
|
+
value.node.innerText?.trim() ||
|
|
179
178
|
//@ts-ignore
|
|
180
|
-
value.node.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
await page.evaluate(() => {
|
|
194
|
-
console.log({
|
|
195
|
-
// @ts-ignore
|
|
196
|
-
disable: window?.annotationInstance?.disable,
|
|
197
|
-
});
|
|
198
|
-
if (
|
|
179
|
+
value.node.placeholder?.trim() ||
|
|
180
|
+
"NA",
|
|
181
|
+
}));
|
|
182
|
+
return annotations;
|
|
183
|
+
}, options);
|
|
184
|
+
await page.waitForTimeout(2000);
|
|
185
|
+
let annotatedPageScreenshot;
|
|
186
|
+
const annonationBuffer = await page.screenshot({
|
|
187
|
+
// path: `screenshots/screenshot-${screenshotIndex++}.png`,
|
|
188
|
+
});
|
|
189
|
+
annotatedPageScreenshot = annonationBuffer.toString("base64");
|
|
190
|
+
await page.evaluate(() => {
|
|
191
|
+
console.log({
|
|
199
192
|
// @ts-ignore
|
|
200
|
-
window?.annotationInstance
|
|
201
|
-
// @ts-ignore
|
|
202
|
-
window?.annotationInstance?.destroy) {
|
|
203
|
-
// @ts-ignore
|
|
204
|
-
window?.annotationInstance?.destroy();
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
const annotationMapString = annotationKeys
|
|
208
|
-
?.map((a) => `${a.elementID}:${a.text}`)
|
|
209
|
-
.join("\n");
|
|
210
|
-
// Provides the annotations for all the element present on screen
|
|
211
|
-
// Also provides the annotation of element on which the action needs to be taken
|
|
212
|
-
elementAnnotation = await (0, element_annotation_1.getElementAnnotation)({
|
|
213
|
-
elementDescription: JSON.parse(toolCall.function.arguments)
|
|
214
|
-
.element_description,
|
|
215
|
-
annotations: annotationMapString,
|
|
216
|
-
annotatedScreenshot: annotatedPageScreenshot,
|
|
217
|
-
trace: masterAgentActionSpan,
|
|
218
|
-
llm,
|
|
219
|
-
});
|
|
220
|
-
output.elementAnnotation = elementAnnotation;
|
|
221
|
-
console.log("Output: ", output);
|
|
222
|
-
await testGenReporter.sendCurrentView(annonationBuffer);
|
|
223
|
-
const triggerHintsFlowSpan = masterAgentActionSpan?.span({
|
|
224
|
-
name: "trigger-hints-flow",
|
|
225
|
-
input: {
|
|
226
|
-
outputFromGetNextAction: output,
|
|
227
|
-
generatedAnnotations: annotationKeys,
|
|
228
|
-
},
|
|
193
|
+
disable: window?.annotationInstance?.disable,
|
|
229
194
|
});
|
|
230
|
-
|
|
231
|
-
|
|
195
|
+
if (
|
|
196
|
+
// @ts-ignore
|
|
197
|
+
window?.annotationInstance &&
|
|
198
|
+
// @ts-ignore
|
|
199
|
+
window?.annotationInstance?.destroy) {
|
|
200
|
+
// @ts-ignore
|
|
201
|
+
window?.annotationInstance?.destroy();
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
const annotationMapString = annotationKeys
|
|
205
|
+
?.map((a) => `${a.elementID}:${a.text}`)
|
|
206
|
+
.join("\n");
|
|
207
|
+
// Provides the annotations for all the element present on screen
|
|
208
|
+
// Also provides the annotation of element on which the action needs to be taken
|
|
209
|
+
elementAnnotation = await (0, element_annotation_1.getElementAnnotation)({
|
|
210
|
+
elementDescription: JSON.parse(toolCall.function.arguments)
|
|
211
|
+
.element_description,
|
|
212
|
+
annotations: annotationMapString,
|
|
213
|
+
annotatedScreenshot: annotatedPageScreenshot,
|
|
214
|
+
trace: masterAgentActionSpan,
|
|
215
|
+
llm,
|
|
216
|
+
});
|
|
217
|
+
output.elementAnnotation = elementAnnotation;
|
|
218
|
+
console.log("Output: ", output);
|
|
219
|
+
await testGenReporter.sendCurrentView(annonationBuffer);
|
|
220
|
+
const triggerHintsFlowSpan = masterAgentActionSpan?.span({
|
|
221
|
+
name: "trigger-hints-flow",
|
|
222
|
+
input: {
|
|
232
223
|
outputFromGetNextAction: output,
|
|
233
224
|
generatedAnnotations: annotationKeys,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
// Provides the action whether its a click, fill etc.
|
|
228
|
+
const result = await (0, with_hints_1.triggerHintsFlow)({
|
|
229
|
+
outputFromGetNextAction: output,
|
|
230
|
+
generatedAnnotations: annotationKeys,
|
|
231
|
+
actions,
|
|
232
|
+
llm,
|
|
233
|
+
trace: triggerHintsFlowSpan,
|
|
234
|
+
});
|
|
235
|
+
shouldTriggerHintsFlow = result.shouldTriggerHintsFlow;
|
|
236
|
+
hintsExecutionCompletion = result.hintsExecutionCompletion;
|
|
237
|
+
triggerHintsFlowSpan?.end({
|
|
238
|
+
output: result,
|
|
239
|
+
});
|
|
244
240
|
if (shouldTriggerHintsFlow && hintsExecutionCompletion) {
|
|
245
241
|
const toolCalls = hintsExecutionCompletion?.tool_calls || [];
|
|
246
242
|
for (const i in toolCalls) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-agent.evals.d.ts","sourceRoot":"","sources":["../../src/evals/master-agent.evals.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"master-agent.evals.d.ts","sourceRoot":"","sources":["../../src/evals/master-agent.evals.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,eAAO,MAAM,4BAA4B,EAAE,UA0C1C,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -6,7 +6,7 @@ const skill_1 = require("../actions/skill");
|
|
|
6
6
|
const next_action_1 = require("../agent/master/next-action");
|
|
7
7
|
const page_1 = require("../page");
|
|
8
8
|
const masterGetNextActionEvaluator = async ({ item, trace, }) => {
|
|
9
|
-
const { task, executedActions, failedActions, pageUrl, options, pageScreenshot, annotatedPageScreenshot, disableSkills,
|
|
9
|
+
const { task, executedActions, failedActions, pageUrl, options, pageScreenshot, annotatedPageScreenshot, disableSkills, skills = [], annotations, } = item.input;
|
|
10
10
|
const page = {};
|
|
11
11
|
skill_1.testCaseSkills.updateSkills(skills);
|
|
12
12
|
const actions = new actions_1.PlaywrightActions(new page_1.TestGenPage(page, "page"));
|
|
@@ -21,7 +21,6 @@ const masterGetNextActionEvaluator = async ({ item, trace, }) => {
|
|
|
21
21
|
annotatedPageScreenshot,
|
|
22
22
|
actions,
|
|
23
23
|
disableSkills,
|
|
24
|
-
useHints,
|
|
25
24
|
annotations,
|
|
26
25
|
});
|
|
27
26
|
return {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAOlC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAQpC,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,SAAS,iBAsC3E"}
|
package/dist/index.js
CHANGED
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createTest = void 0;
|
|
7
7
|
const llm_1 = require("@empiricalrun/llm");
|
|
8
|
-
const test_1 = __importDefault(require("playwright/test"));
|
|
9
8
|
const run_1 = require("./agent/master/run");
|
|
10
9
|
const utils_1 = require("./bin/utils");
|
|
11
10
|
const client_1 = __importDefault(require("./file/client"));
|
|
12
11
|
const reporter_1 = require("./reporter");
|
|
13
12
|
const session_1 = require("./session");
|
|
13
|
+
const pw_test_1 = require("./utils/pw-test");
|
|
14
14
|
process.on("beforeExit", async () => await (0, llm_1.flushAllTraces)());
|
|
15
15
|
process.on("exit", async () => await (0, llm_1.flushAllTraces)());
|
|
16
16
|
process.on("SIGINT", async () => await (0, llm_1.flushAllTraces)());
|
|
@@ -50,6 +50,7 @@ async function createTest(task, page, scope) {
|
|
|
50
50
|
generatedCode: code,
|
|
51
51
|
importPaths,
|
|
52
52
|
});
|
|
53
|
-
|
|
53
|
+
// skip the rest of the test once generation is over
|
|
54
|
+
await (0, pw_test_1.skipTest)();
|
|
54
55
|
}
|
|
55
56
|
exports.createTest = createTest;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,eAAe,EACf,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,QAAQ,CAAC;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pw-test.d.ts","sourceRoot":"","sources":["../../src/utils/pw-test.ts"],"names":[],"mappings":"AAEA,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,GAAG,CAAC,CAKjE;AAED,wBAAsB,QAAQ,kBAQ7B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.skipTest = exports.getTestFixtureModuleFromRepo = void 0;
|
|
7
|
+
const api_1 = __importDefault(require("tsx/cjs/api"));
|
|
8
|
+
async function getTestFixtureModuleFromRepo() {
|
|
9
|
+
const [lastDir] = process.cwd().split("/").reverse();
|
|
10
|
+
const dir = `${process.cwd()}/${lastDir}`;
|
|
11
|
+
const { test } = await api_1.default.require(`./tests/fixtures.ts`, dir);
|
|
12
|
+
return test;
|
|
13
|
+
}
|
|
14
|
+
exports.getTestFixtureModuleFromRepo = getTestFixtureModuleFromRepo;
|
|
15
|
+
async function skipTest() {
|
|
16
|
+
let test;
|
|
17
|
+
try {
|
|
18
|
+
test = await getTestFixtureModuleFromRepo();
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
console.error("Error while importing fixture module to extract test:", e);
|
|
22
|
+
}
|
|
23
|
+
test.skip();
|
|
24
|
+
}
|
|
25
|
+
exports.skipTest = skipTest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.53",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"@aws-sdk/client-s3": "^3.614.0",
|
|
46
46
|
"@aws-sdk/s3-request-presigner": "^3.614.0",
|
|
47
47
|
"@babel/parser": "^7.26.3",
|
|
48
|
-
"@playwright/test": "1.47.1",
|
|
49
48
|
"@types/sanitize-html": "^2.11.0",
|
|
50
49
|
"commander": "^12.1.0",
|
|
51
50
|
"detect-port": "^1.6.1",
|
|
@@ -71,11 +70,12 @@
|
|
|
71
70
|
"ts-morph": "^24.0.0",
|
|
72
71
|
"tsx": "^4.16.2",
|
|
73
72
|
"typescript": "^5.3.3",
|
|
74
|
-
"@empiricalrun/llm": "^0.9.
|
|
73
|
+
"@empiricalrun/llm": "^0.9.29",
|
|
75
74
|
"@empiricalrun/r2-uploader": "^0.3.7",
|
|
76
75
|
"@empiricalrun/reporter": "^0.21.6"
|
|
77
76
|
},
|
|
78
77
|
"devDependencies": {
|
|
78
|
+
"@playwright/test": "1.47.1",
|
|
79
79
|
"@types/detect-port": "^1.3.5",
|
|
80
80
|
"@types/express": "^4.17.21",
|
|
81
81
|
"@types/fs-extra": "^11.0.4",
|