@immense/vue-pom-generator 1.0.49 → 1.0.50

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.
Files changed (37) hide show
  1. package/RELEASE_NOTES.md +48 -20
  2. package/class-generation/{BasePage.ts → base-page.ts} +19 -4
  3. package/class-generation/callout.ts +827 -0
  4. package/class-generation/floating-ui.ts +814 -0
  5. package/class-generation/index.ts +11 -10
  6. package/class-generation/{Pointer.ts → pointer.ts} +81 -101
  7. package/dist/class-generation/{BasePage.d.ts → base-page.d.ts} +6 -2
  8. package/dist/class-generation/base-page.d.ts.map +1 -0
  9. package/dist/class-generation/callout.d.ts +20 -0
  10. package/dist/class-generation/callout.d.ts.map +1 -0
  11. package/dist/class-generation/floating-ui.d.ts +100 -0
  12. package/dist/class-generation/floating-ui.d.ts.map +1 -0
  13. package/dist/class-generation/{Pointer.d.ts → pointer.d.ts} +5 -5
  14. package/dist/class-generation/pointer.d.ts.map +1 -0
  15. package/dist/index.cjs +27 -14
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.mjs +27 -14
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/playwright.config.d.ts +3 -0
  20. package/dist/playwright.config.d.ts.map +1 -0
  21. package/dist/plugin/support/build-plugin.d.ts.map +1 -1
  22. package/dist/plugin/support/dev-plugin.d.ts.map +1 -1
  23. package/dist/plugin/types.d.ts +1 -1
  24. package/dist/tests/fixtures/generated-tsc/{BasePage.full.d.ts → base-page.full.d.ts} +1 -1
  25. package/dist/tests/fixtures/generated-tsc/base-page.full.d.ts.map +1 -0
  26. package/dist/tests/fixtures/generated-tsc/{BasePage.minimal.d.ts → base-page.minimal.d.ts} +1 -1
  27. package/dist/tests/fixtures/generated-tsc/base-page.minimal.d.ts.map +1 -0
  28. package/dist/tests/fixtures/generated-tsc/{Pointer.d.ts → pointer.d.ts} +1 -1
  29. package/dist/tests/fixtures/generated-tsc/pointer.d.ts.map +1 -0
  30. package/dist/tests/playwright/pointer-callout.spec.d.ts +2 -0
  31. package/dist/tests/playwright/pointer-callout.spec.d.ts.map +1 -0
  32. package/package.json +6 -2
  33. package/dist/class-generation/BasePage.d.ts.map +0 -1
  34. package/dist/class-generation/Pointer.d.ts.map +0 -1
  35. package/dist/tests/fixtures/generated-tsc/BasePage.full.d.ts.map +0 -1
  36. package/dist/tests/fixtures/generated-tsc/BasePage.minimal.d.ts.map +0 -1
  37. package/dist/tests/fixtures/generated-tsc/Pointer.d.ts.map +0 -1
package/RELEASE_NOTES.md CHANGED
@@ -1,36 +1,64 @@
1
- I'll gather the release data between v1.0.48 and HEAD to generate accurate release notes.
1
+ ## Highlights
2
2
 
3
- Based on the commit data, this is a focused release with one commit. Here are the release notes:
3
+ - **Bundled Floating UI runtime** Added 1,600+ lines of vendored Floating UI code for callout
4
+ positioning without external dependencies
5
+ - **File naming convention update** – Migrated class-generation files from PascalCase to
6
+ kebab-case (BasePage → base-page, Pointer → pointer)
7
+ - **Playwright integration** – Added Playwright configuration and end-to-end tests for
8
+ pointer-callout interactions
9
+ - **Enhanced pointer testing** – 232+ new lines of pointer tests and dedicated callout test
10
+ fixtures
4
11
 
5
- ---
6
-
7
- ## Highlights
12
+ ## Changes
8
13
 
9
- - **Enhanced Playwright visual debugging**: Cursor annotations now render properly during test
10
- execution
11
- - Improved test coverage with new Pointer test cases
12
- - Better visual feedback for automated test runs
14
+ **Core Functionality**
15
+ - Bundled Floating UI library for callout runtime (`callout.ts`, `floating-ui.ts`)
16
+ - Added `bundle-floating-ui-runtime.mjs` script for vendoring dependencies
13
17
 
14
- ## Changes
18
+ **File Renames & Refactoring**
19
+ - Renamed `BasePage.ts` → `base-page.ts` (97% similarity)
20
+ - Renamed `Pointer.ts` → `pointer.ts` (71% similarity)
21
+ - Updated all imports and test fixtures to reflect kebab-case naming
15
22
 
16
- ### Fixes
17
- - **Render Playwright annotations**: Fixed annotation rendering in the visual cursor overlay
18
- system, ensuring annotation text displays correctly during animated pointer movements
23
+ **Testing**
24
+ - Added Playwright configuration and pointer-callout E2E spec (177 lines)
25
+ - Added HTML fixture for callout interactions (145 lines)
26
+ - Added `serve-fixtures.mjs` utility for local test server
27
+ - Enhanced pointer unit tests with extensive new coverage
28
+ - Updated class-generation-coverage, dev-plugin-options, and generated-tsc tests
19
29
 
20
- ### Tests
21
- - Added comprehensive test coverage for Pointer annotation functionality
30
+ **Tooling**
31
+ - Updated plugin support files for new file structure
32
+ - Modified packed-smoke-check script
22
33
 
23
34
  ## Breaking Changes
24
35
 
25
- None
36
+ - **File naming**: `BasePage.ts` → `base-page.ts`, `Pointer.ts` → `pointer.ts` – update any
37
+ direct imports
38
+ - Generated TypeScript output paths changed to kebab-case
26
39
 
27
40
  ## Pull Requests Included
28
41
 
29
- Based on the commit in this release, this appears to be a direct commit rather than a merged PR
30
- within the specified time window.
42
+ - #12 feat: add split Playwright POM output for discoverability
43
+ (https://github.com/immense/vue-pom-generator/pull/12) (@dkattan)
44
+ - #11 feat: fail fast on unnameable wrapper handlers
45
+ (https://github.com/immense/vue-pom-generator/pull/11) (@dkattan)
46
+ - #8 chore: bump version to 1.0.43 (https://github.com/immense/vue-pom-generator/pull/8)
47
+ (@mayfieldiv)
48
+ - #7 test: add build–serve parity regression tests
49
+ (https://github.com/immense/vue-pom-generator/pull/7) (@mayfieldiv)
50
+ - #6 fix: fail fast on dev snapshot generation errors
51
+ (https://github.com/immense/vue-pom-generator/pull/6) (@dkattan)
52
+ - #5 fix: dev-mode POM generation parity with build mode
53
+ (https://github.com/immense/vue-pom-generator/pull/5) (@mayfieldiv)
54
+ - #4 Fix keyed POM dedupe and C# navigation returns
55
+ (https://github.com/immense/vue-pom-generator/pull/4) (@dkattan)
56
+ - #1 Add PR release-notes preview comments (https://github.com/immense/vue-pom-generator/pull/1)
57
+ (@dkattan)
31
58
 
32
59
  ## Testing
33
60
 
34
- - New test cases added to `tests/pointer.test.ts` validating annotation rendering
35
- - Total test additions: 52 new lines of test code
61
+ Comprehensive test coverage added: Playwright E2E tests for callout interactions, 232+ lines of
62
+ enhanced pointer unit tests, and updated fixtures across class-generation-coverage,
63
+ dev-plugin-options, and generated-tsc test suites.
36
64
 
@@ -1,8 +1,9 @@
1
1
  import type { PwLocator, PwPage } from "./playwright-types";
2
2
  import { TESTID_CLICK_EVENT_NAME, TESTID_CLICK_EVENT_STRICT_FLAG } from "../click-instrumentation";
3
3
  import type { TestIdClickEventDetail } from "../click-instrumentation";
4
- import { Pointer } from "./Pointer";
5
- import type { AfterPointerClick, AfterPointerClickInfo } from "./Pointer";
4
+ import { Callout } from "./callout";
5
+ import { Pointer } from "./pointer";
6
+ import type { AfterPointerClick, AfterPointerClickInfo } from "./pointer";
6
7
 
7
8
  // Click instrumentation is optional for generated POMs.
8
9
  //
@@ -92,6 +93,7 @@ export class ObjectId {
92
93
  export class BasePage {
93
94
  protected readonly testIdAttribute: string;
94
95
 
96
+ private readonly callout: Callout;
95
97
  private readonly pointer: InstanceType<typeof Pointer>;
96
98
 
97
99
  /**
@@ -100,7 +102,8 @@ export class BasePage {
100
102
  constructor(protected page: PwPage, options?: { testIdAttribute?: string }) {
101
103
  this.testIdAttribute = (options?.testIdAttribute || "data-testid").trim() || "data-testid";
102
104
 
103
- this.pointer = new Pointer(this.page, this.testIdAttribute);
105
+ this.callout = new Callout(this.page);
106
+ this.pointer = new Pointer(this.page, this.testIdAttribute, this.callout);
104
107
  }
105
108
 
106
109
  private async waitForTestIdClickEventAfter(testId: string, options?: { timeoutMs?: number }): Promise<void> {
@@ -239,7 +242,7 @@ export class BasePage {
239
242
  protected async animateCursorToElement(
240
243
  target: string | PwLocator,
241
244
  executeClick: boolean = true,
242
- delayMs: number = 100,
245
+ delayMs: number = 1000,
243
246
  annotationText: string = "",
244
247
  options?: {
245
248
  afterClick?: AfterPointerClick;
@@ -248,6 +251,18 @@ export class BasePage {
248
251
  await this.pointer.animateCursorToElement(target, executeClick, delayMs, annotationText, options);
249
252
  }
250
253
 
254
+ public async showCallout(target: string | PwLocator, annotationText: string): Promise<void> {
255
+ await this.callout.showForElement(target, annotationText);
256
+ }
257
+
258
+ public async showCalloutByTestId(testId: string, annotationText: string): Promise<void> {
259
+ await this.showCallout(this.selectorForTestId(testId), annotationText);
260
+ }
261
+
262
+ public async hideCallout(): Promise<void> {
263
+ await this.callout.hide();
264
+ }
265
+
251
266
  /**
252
267
  * Creates an indexable proxy for keyed elements so generated POMs can expose
253
268
  * ergonomic accessors like: