@immense/vue-pom-generator 1.0.49 → 1.0.51
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 +14 -20
- package/class-generation/{BasePage.ts → base-page.ts} +20 -4
- package/class-generation/callout.ts +827 -0
- package/class-generation/floating-ui.ts +837 -0
- package/class-generation/index.ts +11 -10
- package/class-generation/{Pointer.ts → pointer.ts} +81 -101
- 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} +5 -5
- 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,24 +1,18 @@
|
|
|
1
|
-
●
|
|
1
|
+
● ## Highlights
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Highlights
|
|
8
|
-
|
|
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
|
|
3
|
+
- Fixed upstream runtime headers for Floating UI support
|
|
4
|
+
- Enhanced bundling script for Floating UI runtime dependencies
|
|
5
|
+
- Improved test coverage for class generation
|
|
13
6
|
|
|
14
7
|
## Changes
|
|
15
8
|
|
|
16
|
-
### Fixes
|
|
17
|
-
-
|
|
18
|
-
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
- Fixed upstream runtime headers integration for Floating UI components
|
|
11
|
+
- Updated base page generation to include runtime header support
|
|
12
|
+
- Enhanced Floating UI class generation with proper header handling
|
|
19
13
|
|
|
20
|
-
###
|
|
21
|
-
- Added
|
|
14
|
+
### Testing
|
|
15
|
+
- Added class generation coverage tests for new functionality
|
|
22
16
|
|
|
23
17
|
## Breaking Changes
|
|
24
18
|
|
|
@@ -26,11 +20,11 @@
|
|
|
26
20
|
|
|
27
21
|
## Pull Requests Included
|
|
28
22
|
|
|
29
|
-
Based on the commit
|
|
30
|
-
|
|
23
|
+
Based on the commit range v1.0.50..HEAD, this release contains changes from:
|
|
24
|
+
- Internal commit: fix: upstream runtime headers (9b96445)
|
|
31
25
|
|
|
32
26
|
## Testing
|
|
33
27
|
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
Test coverage expanded in `tests/class-generation-coverage.test.ts` to validate the new runtime
|
|
29
|
+
header functionality.
|
|
36
30
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
1
2
|
import type { PwLocator, PwPage } from "./playwright-types";
|
|
2
3
|
import { TESTID_CLICK_EVENT_NAME, TESTID_CLICK_EVENT_STRICT_FLAG } from "../click-instrumentation";
|
|
3
4
|
import type { TestIdClickEventDetail } from "../click-instrumentation";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
5
|
+
import { Callout } from "./callout";
|
|
6
|
+
import { Pointer } from "./pointer";
|
|
7
|
+
import type { AfterPointerClick, AfterPointerClickInfo } from "./pointer";
|
|
6
8
|
|
|
7
9
|
// Click instrumentation is optional for generated POMs.
|
|
8
10
|
//
|
|
@@ -92,6 +94,7 @@ export class ObjectId {
|
|
|
92
94
|
export class BasePage {
|
|
93
95
|
protected readonly testIdAttribute: string;
|
|
94
96
|
|
|
97
|
+
private readonly callout: Callout;
|
|
95
98
|
private readonly pointer: InstanceType<typeof Pointer>;
|
|
96
99
|
|
|
97
100
|
/**
|
|
@@ -100,7 +103,8 @@ export class BasePage {
|
|
|
100
103
|
constructor(protected page: PwPage, options?: { testIdAttribute?: string }) {
|
|
101
104
|
this.testIdAttribute = (options?.testIdAttribute || "data-testid").trim() || "data-testid";
|
|
102
105
|
|
|
103
|
-
this.
|
|
106
|
+
this.callout = new Callout(this.page);
|
|
107
|
+
this.pointer = new Pointer(this.page, this.testIdAttribute, this.callout);
|
|
104
108
|
}
|
|
105
109
|
|
|
106
110
|
private async waitForTestIdClickEventAfter(testId: string, options?: { timeoutMs?: number }): Promise<void> {
|
|
@@ -239,7 +243,7 @@ export class BasePage {
|
|
|
239
243
|
protected async animateCursorToElement(
|
|
240
244
|
target: string | PwLocator,
|
|
241
245
|
executeClick: boolean = true,
|
|
242
|
-
delayMs: number =
|
|
246
|
+
delayMs: number = 1000,
|
|
243
247
|
annotationText: string = "",
|
|
244
248
|
options?: {
|
|
245
249
|
afterClick?: AfterPointerClick;
|
|
@@ -248,6 +252,18 @@ export class BasePage {
|
|
|
248
252
|
await this.pointer.animateCursorToElement(target, executeClick, delayMs, annotationText, options);
|
|
249
253
|
}
|
|
250
254
|
|
|
255
|
+
public async showCallout(target: string | PwLocator, annotationText: string): Promise<void> {
|
|
256
|
+
await this.callout.showForElement(target, annotationText);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
public async showCalloutByTestId(testId: string, annotationText: string): Promise<void> {
|
|
260
|
+
await this.showCallout(this.selectorForTestId(testId), annotationText);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
public async hideCallout(): Promise<void> {
|
|
264
|
+
await this.callout.hide();
|
|
265
|
+
}
|
|
266
|
+
|
|
251
267
|
/**
|
|
252
268
|
* Creates an indexable proxy for keyed elements so generated POMs can expose
|
|
253
269
|
* ergonomic accessors like:
|