@yasserkhanorg/e2e-agents 0.5.15 → 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
|
@@ -422,12 +422,13 @@ async function mapAITestsToFlows(appRoot, testsRoot, config, flows, tests) {
|
|
|
422
422
|
'- Keep at most 5 tests per flow.',
|
|
423
423
|
'- Use exact flowId values from FLOWS.',
|
|
424
424
|
'- A flow may only map to tests listed under FLOW_CANDIDATE_SIGNALS for that flow.',
|
|
425
|
-
'- Map a test when its file path OR test content titles
|
|
426
|
-
'-
|
|
427
|
-
'-
|
|
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.',
|
|
428
429
|
'- missingScenarios decision tree based on tests.length AFTER you have determined your test mappings:',
|
|
429
|
-
' * tests.length >=
|
|
430
|
-
' * tests.length 1-
|
|
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.',
|
|
431
432
|
' * tests.length 0: list 3-5 core user-facing scenarios that must be covered.',
|
|
432
433
|
' Write each scenario as a short imperative starting with a verb.',
|
|
433
434
|
'',
|
package/dist/agent/runner.js
CHANGED
|
@@ -45,10 +45,10 @@ function computeGaps(flows, coverageMap, coverage) {
|
|
|
45
45
|
if (coveredBy.length === 0) {
|
|
46
46
|
return true; // no tests at all
|
|
47
47
|
}
|
|
48
|
-
// Flows with
|
|
49
|
-
// maps
|
|
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
50
|
// missingScenarios from the AI are informational for such flows, not blocking.
|
|
51
|
-
if (coveredBy.length >=
|
|
51
|
+
if (coveredBy.length >= 3) {
|
|
52
52
|
return false;
|
|
53
53
|
}
|
|
54
54
|
// For flows with 1-3 tests, flag as a gap if AI identified missing scenarios.
|
|
@@ -419,12 +419,13 @@ export async function mapAITestsToFlows(appRoot, testsRoot, config, flows, tests
|
|
|
419
419
|
'- Keep at most 5 tests per flow.',
|
|
420
420
|
'- Use exact flowId values from FLOWS.',
|
|
421
421
|
'- A flow may only map to tests listed under FLOW_CANDIDATE_SIGNALS for that flow.',
|
|
422
|
-
'- Map a test when its file path OR test content titles
|
|
423
|
-
'-
|
|
424
|
-
'-
|
|
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.',
|
|
425
426
|
'- missingScenarios decision tree based on tests.length AFTER you have determined your test mappings:',
|
|
426
|
-
' * tests.length >=
|
|
427
|
-
' * tests.length 1-
|
|
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.',
|
|
428
429
|
' * tests.length 0: list 3-5 core user-facing scenarios that must be covered.',
|
|
429
430
|
' Write each scenario as a short imperative starting with a verb.',
|
|
430
431
|
'',
|
package/dist/esm/agent/runner.js
CHANGED
|
@@ -41,10 +41,10 @@ function computeGaps(flows, coverageMap, coverage) {
|
|
|
41
41
|
if (coveredBy.length === 0) {
|
|
42
42
|
return true; // no tests at all
|
|
43
43
|
}
|
|
44
|
-
// Flows with
|
|
45
|
-
// maps
|
|
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
46
|
// missingScenarios from the AI are informational for such flows, not blocking.
|
|
47
|
-
if (coveredBy.length >=
|
|
47
|
+
if (coveredBy.length >= 3) {
|
|
48
48
|
return false;
|
|
49
49
|
}
|
|
50
50
|
// For flows with 1-3 tests, flag as a gap if AI identified missing scenarios.
|
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",
|