@immense/vue-pom-generator 1.0.74 → 1.0.76

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.cjs CHANGED
@@ -7666,8 +7666,10 @@ Fix: remove the explicit ${attrLabel}, or change existingIdBehavior to "overwrit
7666
7666
  });
7667
7667
  return;
7668
7668
  }
7669
+ const existingElementDataTestId = tryGetExistingElementDataTestId(element, testIdAttribute);
7670
+ const shouldPreserveExisting = existingElementDataTestId && existingIdBehavior === "preserve";
7669
7671
  const clickDirective = tryGetClickDirective(element);
7670
- if (clickDirective) {
7672
+ if (clickDirective && !shouldPreserveExisting) {
7671
7673
  const clickSuffix = getComposedClickHandlerContent(element, context, innerText, clickDirective, {
7672
7674
  contextFilename: context.filename
7673
7675
  });
@@ -7688,7 +7690,6 @@ Fix: remove the explicit ${attrLabel}, or change existingIdBehavior to "overwrit
7688
7690
  tryWrapClickDirectiveForTestEvents(element, testIdAttribute, resolvedDataTestId.runtimeValue);
7689
7691
  return;
7690
7692
  }
7691
- const existingElementDataTestId = tryGetExistingElementDataTestId(element, testIdAttribute);
7692
7693
  if (existingElementDataTestId) {
7693
7694
  const inferredRole = getNativeRoleFromTagSuffix().toLowerCase();
7694
7695
  const isRecognizedInteractiveRole = inferredRole === "button" || inferredRole === "input" || inferredRole === "select" || inferredRole === "vselect" || inferredRole === "checkbox" || inferredRole === "toggle" || inferredRole === "radio" || inferredRole === "grid" || isComponentLikeTag(element.tag);