@immense/vue-pom-generator 1.0.97 → 1.0.99

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/README.md CHANGED
@@ -790,7 +790,9 @@ own standalone fixture is still generated normally.
790
790
  When `injection.optionKeyAttribute` maps a radio component to `"value"`, its generated
791
791
  selection API uses the domain term directly: `selectByValue(value)`. Other configured
792
792
  attribute names retain `key` when the HTML attribute name is not a valid public TypeScript
793
- identifier (for example `data-value`).
793
+ identifier (for example `data-value`). When the template does not expose a finite set of
794
+ values, the generated parameter accepts primitive HTML values (`string | number | boolean |
795
+ bigint`) so domain enums can be passed without string conversion.
794
796
 
795
797
  `data-pom-instance` is generator-owned. Do not author it in Vue templates.
796
798
 
package/RELEASE_NOTES.md CHANGED
@@ -1,80 +1,65 @@
1
- I'll verify which PRs actually fall within the release window by querying their merge timestamps
2
- from GitHub.
1
+ I'll verify which PRs are actually in the release range and time window before writing the notes.
3
2
 
4
- Let me use the GitHub MCP tools to find PRs merged in the time window.
3
+ Let me check merge times for the commits in range and verify #61's status.
5
4
 
6
- Now I have merge timestamps. Let me convert the window to UTC and check the git log to confirm which
7
- commits are actually in range.
5
+ Now I understand the picture. v1.0.98 tag is at commit f495936 (#61 "Clear Knip findings"), so #61
6
+ is excluded. Only #55 and #63 are in v1.0.99. Let me examine the actual diffs to write accurate
7
+ notes.
8
8
 
9
- PR #59 was part of v1.0.96. Only PR #60 is in v1.0.97. Let me examine the actual changes to write
10
- accurate notes.
11
-
12
- I now have a complete understanding of the changes. Only PR #60 is in this release (PR #59 was part
13
- of v1.0.96, confirmed by git log). Let me generate the release notes.
14
-
15
- Release Notes — v1.0.97
9
+ I now have a complete picture. v1.0.99 includes exactly two PRs (#55 and #63); #61 was the v1.0.98
10
+ release commit itself and is excluded. Here are the release notes:
16
11
 
17
12
  Highlights
18
13
 
19
- - New: Vue Test Utils component object generation — emit behavior-oriented POM objects for mounted
20
- Vue unit tests alongside existing Playwright output
21
- - Generated VTU objects reuse the same semantic instance names, keyed scopes, named-slot
22
- projections, and action names as Playwright POMs
23
- - Tests own mounting and assertions; selectors stay compiler-derived via data-pom-instance scoping
24
- markers
25
- - New opt-in generation.vueTestUtils config with configurable output directory (defaults to
26
- tests/unit/__generated__)
27
- - Full test coverage added: unit tests for the runtime class, type-checking of generated files, and
28
- packed-plugin smoke checks
14
+ - Generated selector methods now accept primitive values (string | number | boolean | bigint) when
15
+ no finite value set is declared, letting domain enums be passed without string conversion (#63)
16
+ - Runtime checkbox/radio activation now targets the nested native control when the test ID lands on
17
+ a component wrapper, fixing activation of Vue checkable components (#55)
18
+ - Keyboard Space activation follows the same nested-control target so wrapper-only elements no
19
+ longer intercept the action (#55)
20
+ - README updated to document the primitive selector value behavior (#63)
29
21
 
30
22
  Changes
31
23
 
32
- Vue Test Utils POM Generation
33
-
34
- - Added class-generation/vue-test-utils-pom.ts — VueTestUtilsPom base class exposing getByTestId,
35
- getByAnyTestId, getComponentInstance, clickByTestId, selectVSelectByTestId, and a public wrapper for
36
- consumer assertions
37
- - Added generateVueTestUtilsFiles and supporting helpers (getVueTestUtilsPrimaryMembers,
38
- getVueTestUtilsExtraMembers, getVueTestUtilsParameters) to class-generation/index.ts
39
- - Generated actions include clickSave(), typeName(text), selectByValue(value), and v-select
40
- interactions — no generated assertion DSL or raw component ancestry exposed
41
- - Refactored getUniquePrimaryPomSpecs out of generateMethodsContentForDependencies for
42
- deduplication reuse
43
-
44
- Configuration & Plugin Wiring
24
+ Selector type generation
45
25
 
46
- - Added generation.vueTestUtils option (with outDir) to VuePomGeneratorPluginOptions in
47
- plugin/types.ts
48
- - Added vueTestUtilsOutDir to ResolvedGenerationSupportOptions in
49
- plugin/resolved-generation-options.ts
50
- - Wired the option through create-vue-pom-generator-plugins.ts, build-plugin.ts, and dev-plugin.ts
51
- - Validation: fails fast if vueTestUtils.outDir is empty or matches generation.outDir
26
+ - Widened generated selector parameter types from string to string | number | boolean | bigint for
27
+ non-key selectors whose templates expose no finite value set (utils.ts)
28
+ - applyResolvedDataTestId now resolves selectorParameterName before computing the key type so the
29
+ widened union is applied consistently
52
30
 
53
- Dependencies
31
+ Runtime activation
54
32
 
55
- - Added @vue/test-utils (^2.4.11), @vue/server-renderer, and vue (3.5.27) as devDependencies
33
+ - Added CHECKABLE_CONTROL_SELECTOR constant covering input[type="checkbox"] and input[type="radio"]
34
+ (class-generation/base-page.ts)
35
+ - When preferAssociatedLabel is set, BasePage.clickTestId now locates the nested native checkable
36
+ control inside the wrapper and uses it as the click target instead of the wrapper element
37
+ - Keyboard activation (Space) and cursor animation now target the nested control rather than the
38
+ wrapper
56
39
 
57
40
  Documentation
58
41
 
59
- - Added full README section covering setup, usage example, and the generation.vueTestUtils.outDir
60
- reference
42
+ - README: documented that templates without a finite value set accept primitive HTML values so
43
+ domain enums can be passed directly
61
44
 
62
45
  Breaking Changes
63
46
 
64
- None. Vue Test Utils generation is opt-in; existing Playwright-only behavior is unchanged.
47
+ None. The selector type change widens string to a superset union, and the runtime activation fix
48
+ corrects behavior without altering the generated POM API surface.
65
49
 
66
50
  Pull Requests Included
67
51
 
68
- - ]8;id=md-c46er0;https://github.com/immense/vue-pom-generator/pull/60#60 — Generate Vue Test Utils component objects]8;;]8;; (@dkattan)]8;;
52
+ - ]8;id=md-cy57tx;https://github.com/immense/vue-pom-generator/pull/63#63 Fix primitive selector value types]8;;
53
+ - ]8;id=md-1f8vu20;https://github.com/immense/vue-pom-generator/pull/55#55 fix(runtime): activate nested checkbox controls]8;;
69
54
 
70
55
  Testing
71
56
 
72
- - New tests/vue-test-utils-pom.test.ts (157 lines) exercises the VueTestUtilsPom runtime against
73
- mounted components (radio groups, keyed scoped instances, v-selects, inputs, buttons)
74
- - Extended tests/semantic-component-instances.test.ts to generate Vue Test Utils files and
75
- type-check them with tsc --noEmit
76
- - Extended tests/options.test.ts to verify default acceptance and fail-fast on empty outDir
77
- - Extended tests/resolved-generation-options.test.ts for vueTestUtilsOutDir resolution
78
- - Extended scripts/packed-smoke-check.mjs to build through the packed Vite plugin, emit VTU output,
79
- and type-check generated files including the copied runtime
57
+ - Added parametrized tests for nested checkbox and radio label-click activation, verifying the
58
+ wrapper is not clicked (tests/broad/class-generation-base-page-ts.test.ts)
59
+ - Added a keyboard-activation test for nested checkboxes with invisible associated labels
60
+ - Updated selector type tests to expect string | number | boolean | bigint
61
+ (tests/transform.test.ts)
62
+ - Updated semantic component instance tests to exercise numeric radio values end-to-end, including
63
+ a typecheck consumer file that compiles selectByValue(3)
64
+ (tests/semantic-component-instances.test.ts)
80
65
 
@@ -8,6 +8,7 @@ import type { CalloutRenderer } from "./callout";
8
8
  import { Pointer, type AfterPointerClick, type AfterPointerClickInfo, type PointerRenderer } from "./pointer";
9
9
 
10
10
  const POM_ACTIVE_ACTION_REGISTRY = Symbol.for("@immense/vue-pom-generator.active-action-registry");
11
+ const CHECKABLE_CONTROL_SELECTOR = 'input[type="checkbox"], input[type="radio"]';
11
12
 
12
13
  interface PomActiveActionRecord {
13
14
  componentName?: string;
@@ -621,8 +622,16 @@ export class BasePage {
621
622
  let clickTarget = locator;
622
623
  let activateWithKeyboard = false;
623
624
  if (action?.preferAssociatedLabel) {
624
- const visibleControl = locator;
625
- const controlId = await visibleControl.getAttribute("id");
625
+ // Vue components commonly consume an `id` prop while fallthrough attributes such as
626
+ // `data-testid` land on the component's root wrapper. Prefer the nested native control
627
+ // when present so generated checkbox actions activate the control instead of its wrapper.
628
+ const testIdSelector = this.selectorForTestId(testId);
629
+ const control = this.describeLocator(this.page.locator([
630
+ `${testIdSelector}:is(${CHECKABLE_CONTROL_SELECTOR})`,
631
+ `${testIdSelector} :is(${CHECKABLE_CONTROL_SELECTOR})`,
632
+ ].join(", ")), description).first();
633
+ clickTarget = control;
634
+ const controlId = await control.getAttribute("id");
626
635
  if (controlId) {
627
636
  // Bootstrap custom controls often use an empty label whose painted ::before/::after
628
637
  // pseudo-elements intercept the pointer. Playwright's visible filter can exclude that
@@ -641,14 +650,11 @@ export class BasePage {
641
650
  }
642
651
  }
643
652
  }
644
- else {
645
- clickTarget = visibleControl;
646
- }
647
653
  }
648
654
  const afterClick = this.getAfterPointerClick(wait);
649
655
  if (activateWithKeyboard) {
650
- await this.pointer.animateCursorToElement(locator, false, 200, annotationText);
651
- await locator.press("Space");
656
+ await this.pointer.animateCursorToElement(clickTarget, false, 200, annotationText);
657
+ await clickTarget.press("Space");
652
658
  if (afterClick) {
653
659
  await afterClick({ testId, instrumented: true });
654
660
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base-page.d.ts","sourceRoot":"","sources":["../../class-generation/base-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAK5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAW,KAAK,iBAAiB,EAA8B,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAgC9G;;;;;;;;GAQG;AACH;;;GAGG;AACH,KAAK,UAAU,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,IAAI;KACxC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,EAAE,GACzD,CAAC,SAAS,aAAa,GACvB,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GACxC,CAAC,SAAS,kBAAkB,GAC5B,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GACxC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,GAC7B,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GACnB,UAAU,CAAC,CAAC,CAA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CAAA;KAAE,GACtD,OAAO,CAAC,IAAI,CAAC;IAeH,kBAAkB,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC;cAK7F,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/F;;;;OAIG;cACa,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzE;;;;OAIG;cACa,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAInE;;;;OAIG;cACa,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIvE;;;;;;OAMG;cACa,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5F;;;OAGG;cACa,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5D;;;;OAIG;cACa,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7E"}
package/dist/index.cjs CHANGED
@@ -3052,9 +3052,10 @@ Fix: either (1) include ${bestKeyPreservePlaceholder} in your :${attrLabel} temp
3052
3052
  }
3053
3053
  }
3054
3054
  }
3055
+ const selectorParameterName = args.selectorParameterName?.trim() || "key";
3055
3056
  const getKeyTypeFromValues = (values) => {
3056
3057
  if (!values || values.length === 0) {
3057
- return "string";
3058
+ return selectorParameterName === "key" ? "string" : "string | number | boolean | bigint";
3058
3059
  }
3059
3060
  return values.map((v) => JSON.stringify(v)).join(" | ");
3060
3061
  };
@@ -3079,7 +3080,6 @@ Fix: either (1) include ${bestKeyPreservePlaceholder} in your :${attrLabel} temp
3079
3080
  };
3080
3081
  const normalizedRole = normalizeNativeRole(args.nativeRole) ?? "button";
3081
3082
  const targetPageObjectModelClass = entryOverrides.targetPageObjectModelClass;
3082
- const selectorParameterName = args.selectorParameterName?.trim() || "key";
3083
3083
  const pomKeyPattern = dataTestId.kind === "template" ? toPomKeyPattern(dataTestId, selectorParameterName) : null;
3084
3084
  const formattedDataTestIdForPom = dataTestId.kind === "template" ? pomKeyPattern.formatted : dataTestId.value;
3085
3085
  const selectorPatternKind = dataTestId.kind === "template" ? "parameterized" : "static";