@yasserkhanorg/e2e-agents 0.5.14 → 0.5.16
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,CAgP1B"}
|
package/dist/agent/ai_mapping.js
CHANGED
|
@@ -421,11 +421,16 @@ 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 structure OR test content titles specifically indicate it covers the flow scenario. Behavioral specificity is required — "search_user_post_spec.js" in a /search/ directory covers search_messages because it specifically tests searching for messages. A file named "find_channels.spec.ts" does NOT cover search_messages even if it is in a search-related path because it tests channel navigation, not message searching.',
|
|
426
|
+
'- Map every candidate that has specific behavioral evidence. Multiple files each covering a different aspect of the same flow should all be mapped.',
|
|
427
|
+
'- For candidates whose content you have not read, judge by path structure alone: map only when the path clearly names the specific behavior (not just a general subsystem keyword).',
|
|
428
|
+
'- Only return tests: [] when no candidate has specific behavioral connection to the flow.',
|
|
429
|
+
'- missingScenarios decision tree based on tests.length AFTER you have determined your test mappings:',
|
|
430
|
+
' * tests.length >= 3: return missingScenarios: [] — three or more specific tests covering different scenarios = comprehensive coverage.',
|
|
431
|
+
' * tests.length 1-2: list only scenarios that are genuinely absent from ALL mapped tests combined.',
|
|
432
|
+
' * tests.length 0: list 3-5 core user-facing scenarios that must be covered.',
|
|
433
|
+
' Write each scenario as a short imperative starting with a verb.',
|
|
429
434
|
'',
|
|
430
435
|
`FLOWS (${prioritizedFlows.length}):`,
|
|
431
436
|
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 3+ mapped tests are considered comprehensively covered — the AI
|
|
49
|
+
// maps 3 tests only when each has specific behavioral evidence for the flow.
|
|
50
|
+
// missingScenarios from the AI are informational for such flows, not blocking.
|
|
51
|
+
if (coveredBy.length >= 3) {
|
|
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,16 @@ 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 structure OR test content titles specifically indicate it covers the flow scenario. Behavioral specificity is required — "search_user_post_spec.js" in a /search/ directory covers search_messages because it specifically tests searching for messages. A file named "find_channels.spec.ts" does NOT cover search_messages even if it is in a search-related path because it tests channel navigation, not message searching.',
|
|
423
|
+
'- Map every candidate that has specific behavioral evidence. Multiple files each covering a different aspect of the same flow should all be mapped.',
|
|
424
|
+
'- For candidates whose content you have not read, judge by path structure alone: map only when the path clearly names the specific behavior (not just a general subsystem keyword).',
|
|
425
|
+
'- Only return tests: [] when no candidate has specific behavioral connection to the flow.',
|
|
426
|
+
'- missingScenarios decision tree based on tests.length AFTER you have determined your test mappings:',
|
|
427
|
+
' * tests.length >= 3: return missingScenarios: [] — three or more specific tests covering different scenarios = comprehensive coverage.',
|
|
428
|
+
' * tests.length 1-2: list only scenarios that are genuinely absent from ALL mapped tests combined.',
|
|
429
|
+
' * tests.length 0: list 3-5 core user-facing scenarios that must be covered.',
|
|
430
|
+
' Write each scenario as a short imperative starting with a verb.',
|
|
426
431
|
'',
|
|
427
432
|
`FLOWS (${prioritizedFlows.length}):`,
|
|
428
433
|
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 3+ mapped tests are considered comprehensively covered — the AI
|
|
45
|
+
// maps 3 tests only when each has specific behavioral evidence for the flow.
|
|
46
|
+
// missingScenarios from the AI are informational for such flows, not blocking.
|
|
47
|
+
if (coveredBy.length >= 3) {
|
|
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.16",
|
|
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",
|