@immense/vue-pom-generator 1.0.65 → 1.0.66

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/dist/index.mjs CHANGED
@@ -5560,9 +5560,9 @@ function prepareViewObjectModelClass(componentName, dependencies, componentHiera
5560
5560
  members.push(...getComponentInstances(componentRefsForInstances, componentHierarchyMap, attachmentsForThisClass, widgetInstances));
5561
5561
  members.push(getConstructor(componentRefsForInstances, componentHierarchyMap, attachmentsForThisClass, widgetInstances, { testIdAttribute }));
5562
5562
  }
5563
- if (!isView && attachmentsForThisClass.length > 0) {
5564
- members.push(...getComponentInstances(/* @__PURE__ */ new Set(), componentHierarchyMap, attachmentsForThisClass));
5565
- members.push(getConstructor(/* @__PURE__ */ new Set(), componentHierarchyMap, attachmentsForThisClass, [], { testIdAttribute }));
5563
+ if (!isView && (componentRefsForInstances.size > 0 || attachmentsForThisClass.length > 0)) {
5564
+ members.push(...getComponentInstances(componentRefsForInstances, componentHierarchyMap, attachmentsForThisClass));
5565
+ members.push(getConstructor(componentRefsForInstances, componentHierarchyMap, attachmentsForThisClass, [], { testIdAttribute }));
5566
5566
  }
5567
5567
  members.push(
5568
5568
  ...getAttachmentPassthroughMethods(componentName, dependencies, attachmentsForThisClass, reservedAttachmentPassthroughNames)
@@ -5606,7 +5606,7 @@ function generateViewObjectModelContent(componentName, dependencies, componentHi
5606
5606
  const basePageImport = path.relative(fromAbs, toAbs).replace(/\\/g, "/");
5607
5607
  const basePageImportNoExt = stripExtension(basePageImport).replace(/\\/g, "/");
5608
5608
  const basePageImportSpecifier = basePageImportNoExt.startsWith(".") ? basePageImportNoExt : `./${basePageImportNoExt}`;
5609
- const needsPlaywrightPageImport = prepared.isView || prepared.attachmentsForThisClass.length > 0;
5609
+ const needsPlaywrightPageImport = prepared.isView || prepared.attachmentsForThisClass.length > 0 || prepared.componentRefsForInstances.size > 0 || prepared.widgetInstances.length > 0;
5610
5610
  const customPomImportSpecifiersByClass = options.customPomImportSpecifiersByClass ?? {};
5611
5611
  const customImports = Array.from(
5612
5612
  /* @__PURE__ */ new Set([