comfy-qa 1.7.1 → 1.7.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comfy-qa",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "ComfyUI QA automation CLI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -710,6 +710,10 @@ ${segments.join("\n")}
710
710
  // ---------------------------------------------------------------------------
711
711
 
712
712
  async function runSpec(specPath: string, label: string): Promise<{ ok: boolean; output: string }> {
713
+ // Clean duplicate playwright from demowright submodule (causes "Requiring @playwright/test second time" error)
714
+ for (const d of ["lib/demowright/node_modules/playwright", "lib/demowright/node_modules/@playwright"]) {
715
+ try { fs.rmSync(d, { recursive: true, force: true }); } catch {}
716
+ }
713
717
  // Use -c demo/ to override testDir so specs in demo/ are found
714
718
  const testDir = path.dirname(specPath);
715
719
  console.log(`\n${label}\n Running: bunx playwright test -c ${testDir}/ ${specPath}\n`);
@@ -752,8 +756,8 @@ async function debugLoop(specPath: string, maxRetries = 3): Promise<boolean> {
752
756
  RULES:
753
757
  - Only fix the specific error. Don't rewrite the whole spec.
754
758
  - Keep the same structure (title, segments, outro).
755
- - If a selector timed out, try a more robust selector or add .catch(() => {}).
756
- - If an import is wrong, fix it.
759
+ - NEVER change import paths. Keep them exactly as they are.
760
+ - If a selector timed out, try a more robust selector.
757
761
  - Return the COMPLETE fixed spec file (not just the diff).
758
762
 
759
763
  ## Current spec:
@@ -786,6 +790,10 @@ Return ONLY the fixed TypeScript file content, no markdown fences.`;
786
790
  const balancedBraces = (fixedContent.match(/\{/g)?.length ?? 0) === (fixedContent.match(/\}/g)?.length ?? 0);
787
791
 
788
792
  if (hasImport && hasTest && hasEnd && balancedBraces) {
793
+ // Force correct import paths (LLM sometimes changes them)
794
+ fixedContent = fixedContent
795
+ .replace(/from\s+["'].*?fixtures\/fixture["']/g, 'from "./fixtures/fixture"')
796
+ .replace(/from\s+["'].*?demowright\/dist\/[^"']*["']/g, 'from "../lib/demowright/dist/index.mjs"');
789
797
  fs.writeFileSync(specPath, fixedContent);
790
798
  console.log(` ✏️ Spec updated, retrying...`);
791
799
  } else {