@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.
- package/RELEASE_NOTES.md +47 -36
- package/class-generation/{BasePage.ts → base-page.ts} +19 -4
- package/class-generation/callout.ts +827 -0
- package/class-generation/floating-ui.ts +814 -0
- package/class-generation/index.ts +11 -10
- package/class-generation/{Pointer.ts → pointer.ts} +81 -42
- package/dist/class-generation/{BasePage.d.ts → base-page.d.ts} +6 -2
- package/dist/class-generation/base-page.d.ts.map +1 -0
- package/dist/class-generation/callout.d.ts +20 -0
- package/dist/class-generation/callout.d.ts.map +1 -0
- package/dist/class-generation/floating-ui.d.ts +100 -0
- package/dist/class-generation/floating-ui.d.ts.map +1 -0
- package/dist/class-generation/{Pointer.d.ts → pointer.d.ts} +6 -6
- package/dist/class-generation/pointer.d.ts.map +1 -0
- package/dist/index.cjs +27 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +27 -14
- package/dist/index.mjs.map +1 -1
- package/dist/playwright.config.d.ts +3 -0
- package/dist/playwright.config.d.ts.map +1 -0
- package/dist/plugin/support/build-plugin.d.ts.map +1 -1
- package/dist/plugin/support/dev-plugin.d.ts.map +1 -1
- package/dist/plugin/types.d.ts +1 -1
- package/dist/tests/fixtures/generated-tsc/{BasePage.full.d.ts → base-page.full.d.ts} +1 -1
- package/dist/tests/fixtures/generated-tsc/base-page.full.d.ts.map +1 -0
- package/dist/tests/fixtures/generated-tsc/{BasePage.minimal.d.ts → base-page.minimal.d.ts} +1 -1
- package/dist/tests/fixtures/generated-tsc/base-page.minimal.d.ts.map +1 -0
- package/dist/tests/fixtures/generated-tsc/{Pointer.d.ts → pointer.d.ts} +1 -1
- package/dist/tests/fixtures/generated-tsc/pointer.d.ts.map +1 -0
- package/dist/tests/playwright/pointer-callout.spec.d.ts +2 -0
- package/dist/tests/playwright/pointer-callout.spec.d.ts.map +1 -0
- package/package.json +6 -2
- package/dist/class-generation/BasePage.d.ts.map +0 -1
- package/dist/class-generation/Pointer.d.ts.map +0 -1
- package/dist/tests/fixtures/generated-tsc/BasePage.full.d.ts.map +0 -1
- package/dist/tests/fixtures/generated-tsc/BasePage.minimal.d.ts.map +0 -1
- package/dist/tests/fixtures/generated-tsc/Pointer.d.ts.map +0 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,53 +1,64 @@
|
|
|
1
|
-
●
|
|
1
|
+
● ## Highlights
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- **
|
|
6
|
-
|
|
7
|
-
- **
|
|
8
|
-
|
|
9
|
-
- **
|
|
10
|
-
|
|
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
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
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
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
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
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
39
|
-
|
|
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
|
-
|
|
51
|
-
|
|
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 {
|
|
5
|
-
import
|
|
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.
|
|
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 =
|
|
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:
|