@yasserkhanorg/e2e-agents 0.5.14 → 0.5.15
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai_mapping.d.ts","sourceRoot":"","sources":["../../src/agent/ai_mapping.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AA4BvD,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AA4WD,wBAAsB,iBAAiB,CACnC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,UAAU,EAAE,EACnB,KAAK,EAAE,QAAQ,EAAE,GAClB,OAAO,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"ai_mapping.d.ts","sourceRoot":"","sources":["../../src/agent/ai_mapping.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AA4BvD,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AA4WD,wBAAsB,iBAAiB,CACnC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,UAAU,EAAE,EACnB,KAAK,EAAE,QAAQ,EAAE,GAClB,OAAO,CAAC,eAAe,CAAC,CA+O1B"}
|
package/dist/agent/ai_mapping.js
CHANGED
|
@@ -421,11 +421,15 @@ async function mapAITestsToFlows(appRoot, testsRoot, config, flows, tests) {
|
|
|
421
421
|
'Rules:',
|
|
422
422
|
'- Keep at most 5 tests per flow.',
|
|
423
423
|
'- Use exact flowId values from FLOWS.',
|
|
424
|
-
'- Map a test when you have behavioral evidence it covers the flow scenario, from the file path OR from test titles in the content. A file named search_user_post_spec.js with titles like "search for message by keyword" covers search_messages. Generic subsystem similarity without behavioral evidence is not enough.',
|
|
425
424
|
'- A flow may only map to tests listed under FLOW_CANDIDATE_SIGNALS for that flow.',
|
|
426
|
-
'-
|
|
427
|
-
'-
|
|
428
|
-
'-
|
|
425
|
+
'- Map a test when its file path OR test content titles demonstrate behavioral overlap with the flow scenario. A file named search_user_post_spec.js with titles about searching messages covers search_messages. Generic subsystem similarity alone is not enough.',
|
|
426
|
+
'- When FLOW_CANDIDATE_SIGNALS shows 3 or more candidates for a flow, map ALL that have any behavioral connection to the flow domain — collectively they represent comprehensive coverage. For example, 4+ Cypress search specs collectively cover search_messages even if each only covers one search scenario.',
|
|
427
|
+
'- Only return tests: [] when no candidate has ANY behavioral connection to the flow.',
|
|
428
|
+
'- missingScenarios decision tree based on tests.length AFTER you have determined your test mappings:',
|
|
429
|
+
' * tests.length >= 4: return missingScenarios: [] — comprehensive coverage, no gap to report.',
|
|
430
|
+
' * tests.length 1-3: list only scenarios that are genuinely absent from ALL mapped tests combined.',
|
|
431
|
+
' * tests.length 0: list 3-5 core user-facing scenarios that must be covered.',
|
|
432
|
+
' Write each scenario as a short imperative starting with a verb.',
|
|
429
433
|
'',
|
|
430
434
|
`FLOWS (${prioritizedFlows.length}):`,
|
|
431
435
|
JSON.stringify(prioritizedFlows.map((flow) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/agent/runner.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/agent/runner.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAqT7C,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,OAAO,CAAC;CAClB;AAYD,wBAAsB,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAwTzF;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAqUtF"}
|
package/dist/agent/runner.js
CHANGED
|
@@ -45,7 +45,13 @@ function computeGaps(flows, coverageMap, coverage) {
|
|
|
45
45
|
if (coveredBy.length === 0) {
|
|
46
46
|
return true; // no tests at all
|
|
47
47
|
}
|
|
48
|
-
//
|
|
48
|
+
// Flows with 4+ mapped tests are considered comprehensively covered — the AI
|
|
49
|
+
// maps 4 tests only when multiple spec files collectively demonstrate coverage.
|
|
50
|
+
// missingScenarios from the AI are informational for such flows, not blocking.
|
|
51
|
+
if (coveredBy.length >= 4) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
// For flows with 1-3 tests, flag as a gap if AI identified missing scenarios.
|
|
49
55
|
const flowCoverage = coverageByFlowId.get(flow.id);
|
|
50
56
|
return (flowCoverage?.missingScenarios || []).length > 0;
|
|
51
57
|
})
|
|
@@ -418,11 +418,15 @@ export async function mapAITestsToFlows(appRoot, testsRoot, config, flows, tests
|
|
|
418
418
|
'Rules:',
|
|
419
419
|
'- Keep at most 5 tests per flow.',
|
|
420
420
|
'- Use exact flowId values from FLOWS.',
|
|
421
|
-
'- Map a test when you have behavioral evidence it covers the flow scenario, from the file path OR from test titles in the content. A file named search_user_post_spec.js with titles like "search for message by keyword" covers search_messages. Generic subsystem similarity without behavioral evidence is not enough.',
|
|
422
421
|
'- A flow may only map to tests listed under FLOW_CANDIDATE_SIGNALS for that flow.',
|
|
423
|
-
'-
|
|
424
|
-
'-
|
|
425
|
-
'-
|
|
422
|
+
'- Map a test when its file path OR test content titles demonstrate behavioral overlap with the flow scenario. A file named search_user_post_spec.js with titles about searching messages covers search_messages. Generic subsystem similarity alone is not enough.',
|
|
423
|
+
'- When FLOW_CANDIDATE_SIGNALS shows 3 or more candidates for a flow, map ALL that have any behavioral connection to the flow domain — collectively they represent comprehensive coverage. For example, 4+ Cypress search specs collectively cover search_messages even if each only covers one search scenario.',
|
|
424
|
+
'- Only return tests: [] when no candidate has ANY behavioral connection to the flow.',
|
|
425
|
+
'- missingScenarios decision tree based on tests.length AFTER you have determined your test mappings:',
|
|
426
|
+
' * tests.length >= 4: return missingScenarios: [] — comprehensive coverage, no gap to report.',
|
|
427
|
+
' * tests.length 1-3: list only scenarios that are genuinely absent from ALL mapped tests combined.',
|
|
428
|
+
' * tests.length 0: list 3-5 core user-facing scenarios that must be covered.',
|
|
429
|
+
' Write each scenario as a short imperative starting with a verb.',
|
|
426
430
|
'',
|
|
427
431
|
`FLOWS (${prioritizedFlows.length}):`,
|
|
428
432
|
JSON.stringify(prioritizedFlows.map((flow) => ({
|
package/dist/esm/agent/runner.js
CHANGED
|
@@ -41,7 +41,13 @@ function computeGaps(flows, coverageMap, coverage) {
|
|
|
41
41
|
if (coveredBy.length === 0) {
|
|
42
42
|
return true; // no tests at all
|
|
43
43
|
}
|
|
44
|
-
//
|
|
44
|
+
// Flows with 4+ mapped tests are considered comprehensively covered — the AI
|
|
45
|
+
// maps 4 tests only when multiple spec files collectively demonstrate coverage.
|
|
46
|
+
// missingScenarios from the AI are informational for such flows, not blocking.
|
|
47
|
+
if (coveredBy.length >= 4) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
// For flows with 1-3 tests, flag as a gap if AI identified missing scenarios.
|
|
45
51
|
const flowCoverage = coverageByFlowId.get(flow.id);
|
|
46
52
|
return (flowCoverage?.missingScenarios || []).length > 0;
|
|
47
53
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yasserkhanorg/e2e-agents",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.15",
|
|
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",
|