@immense/vue-pom-generator 1.0.48 → 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 +47 -36
  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 -42
  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} +6 -6
  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,53 +1,64 @@
1
- # Release Notes: v1.0.48
1
+ ## Highlights
2
2
 
3
- ## Highlights
4
-
5
- - **Split Playwright POM Output**: Added new option to generate split/modular Page Object Models
6
- for improved discoverability and maintainability
7
- - **ts-morph Integration**: Migrated TypeScript code generation to use ts-morph library for more
8
- robust and maintainable type emission
9
- - **Fail-Fast Error Handling**: Now fails immediately when encountering unnameable wrapper
10
- handlers instead of generating invalid code
11
- - **Enhanced Type Safety**: Improved TypeScript code generation structure with dedicated
12
- emitters and better type definitions
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
13
11
 
14
12
  ## Changes
15
13
 
16
- ### Features
17
- - Add split Playwright POM output for improved discoverability (#12)
18
- - Fail fast on unnameable wrapper handlers instead of silently generating invalid code (#11)
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
17
+
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
19
22
 
20
- ### Refactoring & Code Quality
21
- - Migrate to ts-morph for TypeScript code generation
22
- - Structure ts-morph emitters into dedicated modules
23
- - Clean up split stub generation logic
24
- - Address PR feedback on split output implementation
25
- - Remove duplicate rebase leftovers
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
26
29
 
27
- ### Configuration & Types
28
- - Add ts-morph dependency to package.json
29
- - Update plugin types to support split output options
30
- - Enhance manifest generator for split POM structure
30
+ **Tooling**
31
+ - Updated plugin support files for new file structure
32
+ - Modified packed-smoke-check script
31
33
 
32
- ### Testing
33
- - Add comprehensive tests for generated TypeScript output
34
- - Add test fixtures for BasePage (full/minimal), Pointer, and playwright-test declarations
35
- - Update class generation coverage tests
36
- - Add option tests for new split output configuration
34
+ ## Breaking Changes
37
35
 
38
- ### Documentation
39
- - Update README with split output documentation and usage examples
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
40
39
 
41
40
  ## Pull Requests Included
42
41
 
43
42
  - #12 feat: add split Playwright POM output for discoverability
44
- (https://github.com/immense/vue-pom-generator/pull/12)
43
+ (https://github.com/immense/vue-pom-generator/pull/12) (@dkattan)
45
44
  - #11 feat: fail fast on unnameable wrapper handlers
46
- (https://github.com/immense/vue-pom-generator/pull/11)
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)
47
58
 
48
59
  ## Testing
49
60
 
50
- Added 173+ lines of new tests for TypeScript code generation, including fixtures for BasePage
51
- and Pointer types. Updated existing test suites to cover split output scenarios and plugin
52
- options.
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.
53
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: