@yasserkhanorg/e2e-agents 0.7.2 → 0.7.4
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/dist/agent/plan.d.ts +1 -0
- package/dist/agent/plan.d.ts.map +1 -1
- package/dist/engine/ai_enrichment.d.ts.map +1 -1
- package/dist/engine/ai_enrichment.js +6 -2
- package/dist/engine/impact_engine.d.ts.map +1 -1
- package/dist/engine/impact_engine.js +5 -4
- package/dist/engine/plan_builder.d.ts.map +1 -1
- package/dist/engine/plan_builder.js +28 -14
- package/dist/esm/engine/ai_enrichment.js +6 -2
- package/dist/esm/engine/impact_engine.js +5 -4
- package/dist/esm/engine/plan_builder.js +28 -14
- package/package.json +1 -1
package/dist/agent/plan.d.ts
CHANGED
package/dist/agent/plan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/agent/plan.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,YAAY,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,QAAQ,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,E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CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AA0JD;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAkIlG"}
|
|
@@ -64,6 +64,10 @@ function buildPrompt(options) {
|
|
|
64
64
|
lines.push('## Instructions');
|
|
65
65
|
lines.push('Return ONLY valid JSON (no markdown fences, no explanation) in this exact shape:');
|
|
66
66
|
lines.push('');
|
|
67
|
+
lines.push('Rules for missingScenarios:');
|
|
68
|
+
lines.push('- For coverage=uncovered: list all scenarios the feature needs.');
|
|
69
|
+
lines.push('- For coverage=covered or coverage=partial: ONLY list scenarios introduced by THIS diff that are likely not covered by existing tests. If the diff adds no new user-visible behavior, return []. Do not pad with generic scenarios.');
|
|
70
|
+
lines.push('');
|
|
67
71
|
lines.push(JSON.stringify({
|
|
68
72
|
impactedFlows: [
|
|
69
73
|
{
|
|
@@ -71,10 +75,10 @@ function buildPrompt(options) {
|
|
|
71
75
|
name: '<human-readable flow name>',
|
|
72
76
|
priority: 'P0|P1|P2',
|
|
73
77
|
reasons: [
|
|
74
|
-
'<EXACTLY 1-2 sentences describing user-visible behavioral impact. Focus on what a user would observe or do differently — NOT file names, NOT implementation details
|
|
78
|
+
'<EXACTLY 1-2 sentences describing user-visible behavioral impact. Focus on what a user would observe or do differently — NOT file names, NOT implementation details.>',
|
|
75
79
|
],
|
|
76
80
|
coveredBy: ['<spec file paths that cover this flow>'],
|
|
77
|
-
missingScenarios: ['<concrete
|
|
81
|
+
missingScenarios: ['<concrete scenario title for a new or changed behavior introduced by THIS diff. E.g. "Thread popout preserves scroll position on reload">'],
|
|
78
82
|
},
|
|
79
83
|
],
|
|
80
84
|
unboundFileAnalysis: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impact_engine.d.ts","sourceRoot":"","sources":["../../src/engine/impact_engine.ts"],"names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S,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,eAAe,CAAC;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,EAAE,cAAc,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAwGD,wBAAgB,aAAa,CACzB,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,EAAE,mBAAmB,GAC7B,YAAY,CA2Ed;AAYD;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,EAAE,CAI/D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,EAAE,CAItE"}
|
|
@@ -73,12 +73,13 @@ function resolveCypressSpecs(cypressRoot, specDirs) {
|
|
|
73
73
|
return specs;
|
|
74
74
|
}
|
|
75
75
|
function computeCoverageStatus(pwSpecs, cySpecs) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
// Playwright is the primary framework — having Playwright specs is sufficient for "covered".
|
|
77
|
+
// Cypress-only = partial (advisory: legacy coverage, migrate when possible).
|
|
78
|
+
// Neither = uncovered (must add tests).
|
|
79
|
+
if (pwSpecs.length > 0) {
|
|
79
80
|
return 'covered';
|
|
80
81
|
}
|
|
81
|
-
if (
|
|
82
|
+
if (cySpecs.length > 0) {
|
|
82
83
|
return 'partial';
|
|
83
84
|
}
|
|
84
85
|
return 'uncovered';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan_builder.d.ts","sourceRoot":"","sources":["../../src/engine/plan_builder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAC,YAAY,EAAkB,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAG3D,OAAO,KAAK,EACR,UAAU,EACV,SAAS,EACT,kBAAkB,EAIrB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAC,UAAU,EAAE,SAAS,EAAE,kBAAkB,EAAC,CAAC;AAqOxD,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,YAAY,EACpB,cAAc,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EACtC,YAAY,CAAC,EAAE,kBAAkB,GAClC,UAAU,
|
|
1
|
+
{"version":3,"file":"plan_builder.d.ts","sourceRoot":"","sources":["../../src/engine/plan_builder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAC,YAAY,EAAkB,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAG3D,OAAO,KAAK,EACR,UAAU,EACV,SAAS,EACT,kBAAkB,EAIrB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAC,UAAU,EAAE,SAAS,EAAE,kBAAkB,EAAC,CAAC;AAqOxD,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,YAAY,EACpB,cAAc,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EACtC,YAAY,CAAC,EAAE,kBAAkB,GAClC,UAAU,CA0IZ;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAMzE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAsEhE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,SAAiC,GAAG,MAAM,CAMvH"}
|
|
@@ -226,7 +226,7 @@ function buildPlanFromImpact(impact, policyOverride, aiEnrichment) {
|
|
|
226
226
|
const aiFeature = f.featureId
|
|
227
227
|
? (aiFeatureByFeatureId.get(f.featureId) ?? aiFeatureByFamilyId.get(f.familyId))
|
|
228
228
|
: aiFeatureByFamilyId.get(f.familyId);
|
|
229
|
-
const baseReasons = [`No
|
|
229
|
+
const baseReasons = [`No E2E tests found for ${label}`];
|
|
230
230
|
const reasons = aiFeature && aiFeature.aiReasons.length > 0
|
|
231
231
|
? [...baseReasons, ...aiFeature.aiReasons.slice(0, 2)]
|
|
232
232
|
: baseReasons;
|
|
@@ -243,15 +243,13 @@ function buildPlanFromImpact(impact, policyOverride, aiEnrichment) {
|
|
|
243
243
|
source: aiFeature ? 'ai+deterministic' : 'deterministic',
|
|
244
244
|
};
|
|
245
245
|
});
|
|
246
|
-
// Add partial gaps as advisory info
|
|
246
|
+
// Add partial gaps as advisory info (Cypress-only coverage — Playwright migration recommended)
|
|
247
247
|
for (const f of partialGaps) {
|
|
248
|
-
const coverageType = f.playwrightSpecs.length > 0 ? 'Cypress' : 'Playwright';
|
|
249
|
-
const hasOpposite = f.playwrightSpecs.length > 0 ? 'Playwright' : 'Cypress';
|
|
250
248
|
const label = featureLabel(f);
|
|
251
249
|
const aiFeature = f.featureId
|
|
252
250
|
? (aiFeatureByFeatureId.get(f.featureId) ?? aiFeatureByFamilyId.get(f.familyId))
|
|
253
251
|
: aiFeatureByFamilyId.get(f.familyId);
|
|
254
|
-
const baseReasons = [
|
|
252
|
+
const baseReasons = [`${label} is covered by Cypress only — consider adding Playwright tests`];
|
|
255
253
|
const reasons = aiFeature && aiFeature.aiReasons.length > 0
|
|
256
254
|
? [...baseReasons, ...aiFeature.aiReasons.slice(0, 2)]
|
|
257
255
|
: baseReasons;
|
|
@@ -266,15 +264,25 @@ function buildPlanFromImpact(impact, policyOverride, aiEnrichment) {
|
|
|
266
264
|
}
|
|
267
265
|
const coveredFlows = impact.impactedFeatures
|
|
268
266
|
.filter((f) => f.coverageStatus === 'covered')
|
|
269
|
-
.map((f) =>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
267
|
+
.map((f) => {
|
|
268
|
+
const aiFeature = f.featureId
|
|
269
|
+
? (aiFeatureByFeatureId.get(f.featureId) ?? aiFeatureByFamilyId.get(f.familyId))
|
|
270
|
+
: aiFeatureByFamilyId.get(f.familyId);
|
|
271
|
+
// Only surface advisory scenarios when AI found new behavior in this diff
|
|
272
|
+
const advisoryScenarios = aiFeature?.aiMissingScenarios?.length
|
|
273
|
+
? aiFeature.aiMissingScenarios
|
|
274
|
+
: undefined;
|
|
275
|
+
return {
|
|
276
|
+
id: featureLabel(f),
|
|
277
|
+
name: featureLabel(f),
|
|
278
|
+
priority: f.priority,
|
|
279
|
+
coveredBy: [
|
|
280
|
+
...(f.playwrightSpecs.length > 0 ? [`${f.playwrightSpecs.length} Playwright spec(s)`] : []),
|
|
281
|
+
...(f.cypressSpecs.length > 0 ? [`${f.cypressSpecs.length} Cypress spec(s)`] : []),
|
|
282
|
+
].slice(0, 3),
|
|
283
|
+
advisoryScenarios,
|
|
284
|
+
};
|
|
285
|
+
});
|
|
278
286
|
const recommendedTests = buildRecommendedTests(impact);
|
|
279
287
|
const requiredNewTests = gaps.map((f) => `${featureLabel(f)}: Add E2E tests`);
|
|
280
288
|
const p0 = impact.impactedFeatures.filter((f) => f.priority === 'P0').length;
|
|
@@ -372,6 +380,12 @@ function renderCiSummaryMarkdown(plan) {
|
|
|
372
380
|
lines.push('');
|
|
373
381
|
for (const flow of plan.coveredFlows) {
|
|
374
382
|
lines.push(`- **${flow.name}** [${flow.priority}] — ${flow.coveredBy.join(', ')}`);
|
|
383
|
+
if (flow.advisoryScenarios && flow.advisoryScenarios.length > 0) {
|
|
384
|
+
lines.push(` 💡 New behavior in this PR — consider adding:`);
|
|
385
|
+
for (const s of flow.advisoryScenarios) {
|
|
386
|
+
lines.push(` - [ ] ${s}`);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
375
389
|
}
|
|
376
390
|
}
|
|
377
391
|
if (plan.confidence < 100) {
|
|
@@ -61,6 +61,10 @@ function buildPrompt(options) {
|
|
|
61
61
|
lines.push('## Instructions');
|
|
62
62
|
lines.push('Return ONLY valid JSON (no markdown fences, no explanation) in this exact shape:');
|
|
63
63
|
lines.push('');
|
|
64
|
+
lines.push('Rules for missingScenarios:');
|
|
65
|
+
lines.push('- For coverage=uncovered: list all scenarios the feature needs.');
|
|
66
|
+
lines.push('- For coverage=covered or coverage=partial: ONLY list scenarios introduced by THIS diff that are likely not covered by existing tests. If the diff adds no new user-visible behavior, return []. Do not pad with generic scenarios.');
|
|
67
|
+
lines.push('');
|
|
64
68
|
lines.push(JSON.stringify({
|
|
65
69
|
impactedFlows: [
|
|
66
70
|
{
|
|
@@ -68,10 +72,10 @@ function buildPrompt(options) {
|
|
|
68
72
|
name: '<human-readable flow name>',
|
|
69
73
|
priority: 'P0|P1|P2',
|
|
70
74
|
reasons: [
|
|
71
|
-
'<EXACTLY 1-2 sentences describing user-visible behavioral impact. Focus on what a user would observe or do differently — NOT file names, NOT implementation details
|
|
75
|
+
'<EXACTLY 1-2 sentences describing user-visible behavioral impact. Focus on what a user would observe or do differently — NOT file names, NOT implementation details.>',
|
|
72
76
|
],
|
|
73
77
|
coveredBy: ['<spec file paths that cover this flow>'],
|
|
74
|
-
missingScenarios: ['<concrete
|
|
78
|
+
missingScenarios: ['<concrete scenario title for a new or changed behavior introduced by THIS diff. E.g. "Thread popout preserves scroll position on reload">'],
|
|
75
79
|
},
|
|
76
80
|
],
|
|
77
81
|
unboundFileAnalysis: [
|
|
@@ -68,12 +68,13 @@ function resolveCypressSpecs(cypressRoot, specDirs) {
|
|
|
68
68
|
return specs;
|
|
69
69
|
}
|
|
70
70
|
function computeCoverageStatus(pwSpecs, cySpecs) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
// Playwright is the primary framework — having Playwright specs is sufficient for "covered".
|
|
72
|
+
// Cypress-only = partial (advisory: legacy coverage, migrate when possible).
|
|
73
|
+
// Neither = uncovered (must add tests).
|
|
74
|
+
if (pwSpecs.length > 0) {
|
|
74
75
|
return 'covered';
|
|
75
76
|
}
|
|
76
|
-
if (
|
|
77
|
+
if (cySpecs.length > 0) {
|
|
77
78
|
return 'partial';
|
|
78
79
|
}
|
|
79
80
|
return 'uncovered';
|
|
@@ -220,7 +220,7 @@ export function buildPlanFromImpact(impact, policyOverride, aiEnrichment) {
|
|
|
220
220
|
const aiFeature = f.featureId
|
|
221
221
|
? (aiFeatureByFeatureId.get(f.featureId) ?? aiFeatureByFamilyId.get(f.familyId))
|
|
222
222
|
: aiFeatureByFamilyId.get(f.familyId);
|
|
223
|
-
const baseReasons = [`No
|
|
223
|
+
const baseReasons = [`No E2E tests found for ${label}`];
|
|
224
224
|
const reasons = aiFeature && aiFeature.aiReasons.length > 0
|
|
225
225
|
? [...baseReasons, ...aiFeature.aiReasons.slice(0, 2)]
|
|
226
226
|
: baseReasons;
|
|
@@ -237,15 +237,13 @@ export function buildPlanFromImpact(impact, policyOverride, aiEnrichment) {
|
|
|
237
237
|
source: aiFeature ? 'ai+deterministic' : 'deterministic',
|
|
238
238
|
};
|
|
239
239
|
});
|
|
240
|
-
// Add partial gaps as advisory info
|
|
240
|
+
// Add partial gaps as advisory info (Cypress-only coverage — Playwright migration recommended)
|
|
241
241
|
for (const f of partialGaps) {
|
|
242
|
-
const coverageType = f.playwrightSpecs.length > 0 ? 'Cypress' : 'Playwright';
|
|
243
|
-
const hasOpposite = f.playwrightSpecs.length > 0 ? 'Playwright' : 'Cypress';
|
|
244
242
|
const label = featureLabel(f);
|
|
245
243
|
const aiFeature = f.featureId
|
|
246
244
|
? (aiFeatureByFeatureId.get(f.featureId) ?? aiFeatureByFamilyId.get(f.familyId))
|
|
247
245
|
: aiFeatureByFamilyId.get(f.familyId);
|
|
248
|
-
const baseReasons = [
|
|
246
|
+
const baseReasons = [`${label} is covered by Cypress only — consider adding Playwright tests`];
|
|
249
247
|
const reasons = aiFeature && aiFeature.aiReasons.length > 0
|
|
250
248
|
? [...baseReasons, ...aiFeature.aiReasons.slice(0, 2)]
|
|
251
249
|
: baseReasons;
|
|
@@ -260,15 +258,25 @@ export function buildPlanFromImpact(impact, policyOverride, aiEnrichment) {
|
|
|
260
258
|
}
|
|
261
259
|
const coveredFlows = impact.impactedFeatures
|
|
262
260
|
.filter((f) => f.coverageStatus === 'covered')
|
|
263
|
-
.map((f) =>
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
261
|
+
.map((f) => {
|
|
262
|
+
const aiFeature = f.featureId
|
|
263
|
+
? (aiFeatureByFeatureId.get(f.featureId) ?? aiFeatureByFamilyId.get(f.familyId))
|
|
264
|
+
: aiFeatureByFamilyId.get(f.familyId);
|
|
265
|
+
// Only surface advisory scenarios when AI found new behavior in this diff
|
|
266
|
+
const advisoryScenarios = aiFeature?.aiMissingScenarios?.length
|
|
267
|
+
? aiFeature.aiMissingScenarios
|
|
268
|
+
: undefined;
|
|
269
|
+
return {
|
|
270
|
+
id: featureLabel(f),
|
|
271
|
+
name: featureLabel(f),
|
|
272
|
+
priority: f.priority,
|
|
273
|
+
coveredBy: [
|
|
274
|
+
...(f.playwrightSpecs.length > 0 ? [`${f.playwrightSpecs.length} Playwright spec(s)`] : []),
|
|
275
|
+
...(f.cypressSpecs.length > 0 ? [`${f.cypressSpecs.length} Cypress spec(s)`] : []),
|
|
276
|
+
].slice(0, 3),
|
|
277
|
+
advisoryScenarios,
|
|
278
|
+
};
|
|
279
|
+
});
|
|
272
280
|
const recommendedTests = buildRecommendedTests(impact);
|
|
273
281
|
const requiredNewTests = gaps.map((f) => `${featureLabel(f)}: Add E2E tests`);
|
|
274
282
|
const p0 = impact.impactedFeatures.filter((f) => f.priority === 'P0').length;
|
|
@@ -366,6 +374,12 @@ export function renderCiSummaryMarkdown(plan) {
|
|
|
366
374
|
lines.push('');
|
|
367
375
|
for (const flow of plan.coveredFlows) {
|
|
368
376
|
lines.push(`- **${flow.name}** [${flow.priority}] — ${flow.coveredBy.join(', ')}`);
|
|
377
|
+
if (flow.advisoryScenarios && flow.advisoryScenarios.length > 0) {
|
|
378
|
+
lines.push(` 💡 New behavior in this PR — consider adding:`);
|
|
379
|
+
for (const s of flow.advisoryScenarios) {
|
|
380
|
+
lines.push(` - [ ] ${s}`);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
369
383
|
}
|
|
370
384
|
}
|
|
371
385
|
if (plan.confidence < 100) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yasserkhanorg/e2e-agents",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Pluggable LLM provider library for AI-powered test automation. Use Claude, Ollama, or your own LLM. Integrate with Playwright, Jest, or any test framework. MCP server for test agents, cost tracking, and hybrid provider mode.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|