@yasserkhanorg/e2e-agents 0.7.6 → 0.7.7

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":"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,CAkGhE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,SAAiC,GAAG,MAAM,CAMvH"}
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,CAuGhE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,SAAiC,GAAG,MAAM,CAMvH"}
@@ -361,47 +361,52 @@ function renderCiSummaryMarkdown(plan) {
361
361
  // ── Blocking gaps ──────────────────────────────────────────────────────────
362
362
  if (mustAddTests && plan.requiredNewTests.length > 0) {
363
363
  lines.push('');
364
- lines.push('### ⚠️ Add E2E tests for these uncovered P0/P1 features');
365
- lines.push('');
366
- lines.push(`The following ${uncoveredP0P1Flows} feature(s) have no test coverage and must be covered before merge:`);
364
+ lines.push(`### ⚠️ Missing coverage for ${uncoveredP0P1Flows} P0/P1 flow(s)`);
367
365
  lines.push('');
368
366
  for (const gap of plan.gapDetails.filter((g) => !g.name.includes('(partial)'))) {
369
367
  const aiLabel = gap.source === 'ai+deterministic' ? ' ✦ AI-enriched' : '';
368
+ // Warning box: name + priority + AI reason (always visible)
370
369
  lines.push(`> [!WARNING]`);
371
370
  lines.push(`> **${gap.name}** · ${gap.priority}${aiLabel}`);
372
- // AI-provided reasons (skip the first generic deterministic reason)
373
371
  const aiReasons = gap.reasons.slice(1);
374
372
  if (aiReasons.length > 0) {
375
373
  lines.push(`> ${aiReasons.join(' ')}`);
376
374
  }
375
+ lines.push('');
376
+ // Scenarios: collapsible below the warning box
377
377
  if (gap.missingScenarios && gap.missingScenarios.length > 0) {
378
- lines.push(`>`);
379
- lines.push(`> **Suggested test scenarios:**`);
378
+ lines.push(`<details><summary>📋 Suggested test scenarios (${gap.missingScenarios.length})</summary>`);
379
+ lines.push('');
380
380
  for (const scenario of gap.missingScenarios) {
381
- lines.push(`> - [ ] ${scenario}`);
381
+ lines.push(`- [ ] ${scenario}`);
382
382
  }
383
+ lines.push('');
384
+ lines.push('</details>');
385
+ lines.push('');
383
386
  }
384
- lines.push('');
385
387
  }
386
388
  }
387
- // ── Advisory: covered flows with new behavior (collapsible) ─────────────
389
+ // ── Advisory: covered flows with new behavior ─────────────────────────────
388
390
  if (flowsWithAdvisory.length > 0) {
389
391
  lines.push('');
390
- lines.push(`<details>`);
391
- lines.push(`<summary>💡 New behavior detected in ${flowsWithAdvisory.length} covered feature${flowsWithAdvisory.length !== 1 ? 's' : ''} — consider adding tests</summary>`);
392
- lines.push('');
393
- lines.push('These features already have E2E tests, but this PR introduces new behavior worth covering:');
392
+ lines.push(`### 💡 New behavior detected in ${flowsWithAdvisory.length} covered feature${flowsWithAdvisory.length !== 1 ? 's' : ''} — consider adding tests`);
394
393
  lines.push('');
395
394
  for (const flow of flowsWithAdvisory) {
396
- lines.push(`#### ${flow.name} · ${flow.priority}`);
397
- lines.push(`*${flow.coveredBy.join(', ')}*`);
395
+ // Green [!TIP] box: just the name (always visible, compact)
396
+ lines.push(`> [!TIP]`);
397
+ lines.push(`> **${flow.name}** · ${flow.priority}`);
398
+ lines.push('');
399
+ // Specs + scenarios: collapsible below
400
+ const coverageSummary = flow.coveredBy.join(', ');
401
+ lines.push(`<details><summary>${coverageSummary} — click to see suggested scenarios</summary>`);
398
402
  lines.push('');
399
403
  for (const s of flow.advisoryScenarios) {
400
404
  lines.push(`- [ ] ${s}`);
401
405
  }
402
406
  lines.push('');
407
+ lines.push('</details>');
408
+ lines.push('');
403
409
  }
404
- lines.push('</details>');
405
410
  }
406
411
  // ── Clean covered flows (collapsed) ───────────────────────────────────────
407
412
  if (cleanFlows.length > 0) {
@@ -355,47 +355,52 @@ export function renderCiSummaryMarkdown(plan) {
355
355
  // ── Blocking gaps ──────────────────────────────────────────────────────────
356
356
  if (mustAddTests && plan.requiredNewTests.length > 0) {
357
357
  lines.push('');
358
- lines.push('### ⚠️ Add E2E tests for these uncovered P0/P1 features');
359
- lines.push('');
360
- lines.push(`The following ${uncoveredP0P1Flows} feature(s) have no test coverage and must be covered before merge:`);
358
+ lines.push(`### ⚠️ Missing coverage for ${uncoveredP0P1Flows} P0/P1 flow(s)`);
361
359
  lines.push('');
362
360
  for (const gap of plan.gapDetails.filter((g) => !g.name.includes('(partial)'))) {
363
361
  const aiLabel = gap.source === 'ai+deterministic' ? ' ✦ AI-enriched' : '';
362
+ // Warning box: name + priority + AI reason (always visible)
364
363
  lines.push(`> [!WARNING]`);
365
364
  lines.push(`> **${gap.name}** · ${gap.priority}${aiLabel}`);
366
- // AI-provided reasons (skip the first generic deterministic reason)
367
365
  const aiReasons = gap.reasons.slice(1);
368
366
  if (aiReasons.length > 0) {
369
367
  lines.push(`> ${aiReasons.join(' ')}`);
370
368
  }
369
+ lines.push('');
370
+ // Scenarios: collapsible below the warning box
371
371
  if (gap.missingScenarios && gap.missingScenarios.length > 0) {
372
- lines.push(`>`);
373
- lines.push(`> **Suggested test scenarios:**`);
372
+ lines.push(`<details><summary>📋 Suggested test scenarios (${gap.missingScenarios.length})</summary>`);
373
+ lines.push('');
374
374
  for (const scenario of gap.missingScenarios) {
375
- lines.push(`> - [ ] ${scenario}`);
375
+ lines.push(`- [ ] ${scenario}`);
376
376
  }
377
+ lines.push('');
378
+ lines.push('</details>');
379
+ lines.push('');
377
380
  }
378
- lines.push('');
379
381
  }
380
382
  }
381
- // ── Advisory: covered flows with new behavior (collapsible) ─────────────
383
+ // ── Advisory: covered flows with new behavior ─────────────────────────────
382
384
  if (flowsWithAdvisory.length > 0) {
383
385
  lines.push('');
384
- lines.push(`<details>`);
385
- lines.push(`<summary>💡 New behavior detected in ${flowsWithAdvisory.length} covered feature${flowsWithAdvisory.length !== 1 ? 's' : ''} — consider adding tests</summary>`);
386
- lines.push('');
387
- lines.push('These features already have E2E tests, but this PR introduces new behavior worth covering:');
386
+ lines.push(`### 💡 New behavior detected in ${flowsWithAdvisory.length} covered feature${flowsWithAdvisory.length !== 1 ? 's' : ''} — consider adding tests`);
388
387
  lines.push('');
389
388
  for (const flow of flowsWithAdvisory) {
390
- lines.push(`#### ${flow.name} · ${flow.priority}`);
391
- lines.push(`*${flow.coveredBy.join(', ')}*`);
389
+ // Green [!TIP] box: just the name (always visible, compact)
390
+ lines.push(`> [!TIP]`);
391
+ lines.push(`> **${flow.name}** · ${flow.priority}`);
392
+ lines.push('');
393
+ // Specs + scenarios: collapsible below
394
+ const coverageSummary = flow.coveredBy.join(', ');
395
+ lines.push(`<details><summary>${coverageSummary} — click to see suggested scenarios</summary>`);
392
396
  lines.push('');
393
397
  for (const s of flow.advisoryScenarios) {
394
398
  lines.push(`- [ ] ${s}`);
395
399
  }
396
400
  lines.push('');
401
+ lines.push('</details>');
402
+ lines.push('');
397
403
  }
398
- lines.push('</details>');
399
404
  }
400
405
  // ── Clean covered flows (collapsed) ───────────────────────────────────────
401
406
  if (cleanFlows.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yasserkhanorg/e2e-agents",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
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",