@yasserkhanorg/e2e-agents 0.5.5 → 0.5.6

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;AA2BvD,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;AAiOD,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,CAqN1B"}
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;AA2BvD,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;AAiOD,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,CAoN1B"}
@@ -371,17 +371,16 @@ async function mapAITestsToFlows(appRoot, testsRoot, config, flows, tests) {
371
371
  matchedTests.add(testPath);
372
372
  }
373
373
  }
374
- // Post-AI exact-name fallback: for any flow still uncovered, if a candidate test
375
- // was matched by exact name (score 999), map it directly regardless of AI confidence.
374
+ // Post-AI exact-name fallback: for any flow still uncovered, search all test paths
375
+ // for a file or directory whose name exactly matches the flow ID. This handles flows
376
+ // whose keywords are all low-signal (e.g. view_user_group_modal) but whose test file
377
+ // is named after the flow and is therefore unambiguous coverage evidence.
378
+ const allNormalizedTests = tests.map((t) => (0, utils_js_1.normalizePath)(t.path)).filter(Boolean);
376
379
  for (const flow of prioritizedFlows) {
377
380
  if (mapped.has(flow.id)) {
378
381
  continue;
379
382
  }
380
- const candidates = candidateSelection.byFlow.get(flow.id);
381
- if (!candidates) {
382
- continue;
383
- }
384
- const exactMatch = Array.from(candidates).find((testPath) => {
383
+ const exactMatch = allNormalizedTests.find((testPath) => {
385
384
  const segments = testPath.split('/');
386
385
  return segments.some((seg) => seg === flow.id || seg.replace(/\.spec\.[tj]sx?$/, '') === flow.id);
387
386
  });
@@ -368,17 +368,16 @@ export async function mapAITestsToFlows(appRoot, testsRoot, config, flows, tests
368
368
  matchedTests.add(testPath);
369
369
  }
370
370
  }
371
- // Post-AI exact-name fallback: for any flow still uncovered, if a candidate test
372
- // was matched by exact name (score 999), map it directly regardless of AI confidence.
371
+ // Post-AI exact-name fallback: for any flow still uncovered, search all test paths
372
+ // for a file or directory whose name exactly matches the flow ID. This handles flows
373
+ // whose keywords are all low-signal (e.g. view_user_group_modal) but whose test file
374
+ // is named after the flow and is therefore unambiguous coverage evidence.
375
+ const allNormalizedTests = tests.map((t) => normalizePath(t.path)).filter(Boolean);
373
376
  for (const flow of prioritizedFlows) {
374
377
  if (mapped.has(flow.id)) {
375
378
  continue;
376
379
  }
377
- const candidates = candidateSelection.byFlow.get(flow.id);
378
- if (!candidates) {
379
- continue;
380
- }
381
- const exactMatch = Array.from(candidates).find((testPath) => {
380
+ const exactMatch = allNormalizedTests.find((testPath) => {
382
381
  const segments = testPath.split('/');
383
382
  return segments.some((seg) => seg === flow.id || seg.replace(/\.spec\.[tj]sx?$/, '') === flow.id);
384
383
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yasserkhanorg/e2e-agents",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
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",