@activate-core/test-forge 0.18.5 → 0.18.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.
@@ -598,18 +598,23 @@ export async function runGenerate(docsDir, useAI = true, force = false, only, ar
598
598
  // AI can't fall back to an uninstalled convention (e.g. supertest).
599
599
  const allowedModules = installedModules(testDir);
600
600
  const transport = transportHint(testDir, framework);
601
- // Playwright is the one framework whose import is mandatory in every spec
602
- // (jest's describe/it/expect are ambient, so a jest area generates fine
603
- // either way). If it is missing, stop before spending a single AI call.
604
- if (framework === 'playwright' && !allowedModules.has('@playwright/test')) {
601
+ // The area's OWN framework is always allowed, installed or not. Refusing
602
+ // it confuses two different things: output that reached for a module the
603
+ // project does not use (genuinely wrong — still refused), and output that
604
+ // is perfectly correct while the project has simply not installed the
605
+ // runner it is configured to use. The second is an environment gap, and
606
+ // throwing away a correct test for it loses real work — the test is
607
+ // written, and the run says the framework must be installed to run it.
608
+ const frameworkPkg = framework === 'playwright' ? '@playwright/test' : 'jest';
609
+ if (!allowedModules.has(frameworkPkg)) {
610
+ allowedModules.add(frameworkPkg);
605
611
  const blocked = blockedAreas.get(journey.area) ?? {
606
- pkg: '@playwright/test',
612
+ pkg: frameworkPkg,
607
613
  dir: areaDir,
608
614
  count: 0,
609
615
  };
610
616
  blocked.count += 1;
611
617
  blockedAreas.set(journey.area, blocked);
612
- continue;
613
618
  }
614
619
  // F10 — selector grounding (Playwright areas only): the real test-hooks
615
620
  // in this area's components, so a generated UI test can't invent one.
@@ -838,17 +843,17 @@ export async function runGenerate(docsDir, useAI = true, force = false, only, ar
838
843
  });
839
844
  }
840
845
  for (const [area, b] of blockedAreas) {
846
+ const browsers = b.pkg === '@playwright/test' ? ' && npx playwright install' : '';
841
847
  results.push({
842
- journeyName: `${b.count} ${area} journey(s) not attempted — ${b.pkg} is not installed`,
848
+ journeyName: `${area}: tests written, but ${b.pkg} is not installed`,
843
849
  testDir: '',
844
850
  testFiles: [],
845
851
  seedPath: '',
846
852
  status: 'skipped',
847
853
  seedStatus: 'none',
848
854
  warnings: [
849
- `every ${area} spec must import ${b.pkg}, so without it the dependency gate ` +
850
- `refuses each generated file and leaves a deferred stub — hours of AI calls for nothing. ` +
851
- `Install it, then re-run: npm i -D ${b.pkg} && npx playwright install`,
855
+ `${b.count} ${area} journey(s) were generated normally and are complete. They cannot RUN ` +
856
+ `until the runner is installed: npm i -D ${b.pkg}${browsers}`,
852
857
  ],
853
858
  });
854
859
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activate-core/test-forge",
3
- "version": "0.18.5",
3
+ "version": "0.18.6",
4
4
  "description": "AI-powered QA automation. Scans a project, drafts journey docs, and generates seeded Jest/Playwright tests. Works in any project, with any AI CLI.",
5
5
  "type": "module",
6
6
  "bin": {