@test2doc/playwright 0.13.1 → 0.15.0

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
@@ -97,14 +97,14 @@ The `TEST2DOC=true` is required to activate the test2doc metadata to pass to the
97
97
  ...
98
98
  "scripts": {
99
99
  ...
100
- "docs:generate": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts"
100
+ "doc:gen": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts"
101
101
  }
102
102
  ...
103
103
  }
104
104
  ```
105
105
 
106
106
  ## Verify installation
107
- To verify your setup works, run `npm run docs:generate` and check that markdown files appear in your `./doc/docs` directory, or wherever you specified the output directory in the `playwright-test2doc.config.ts` file.
107
+ To verify your setup works, run `npm run doc:gen` and check that markdown files appear in your `./doc/docs` directory, or wherever you specified the output directory in the `playwright-test2doc.config.ts` file.
108
108
 
109
109
  ## Filtering Tests
110
110
  It is possible you may wish to opt-in some tests or opt-out other tests from doc generation. This is possible with playwright tags.
@@ -151,7 +151,7 @@ Run only tests with the `@test2doc` tag.
151
151
  ...
152
152
  "scripts": {
153
153
  ...
154
- "docs:generate": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts --grep @test2doc"
154
+ "doc:gen": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts --grep @test2doc"
155
155
  }
156
156
  ...
157
157
  }
@@ -168,7 +168,7 @@ Skip tests with the `@skip-docs` tag.
168
168
  ...
169
169
  "scripts": {
170
170
  ...
171
- "docs:generate": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts --grep-invert @skip-docs"
171
+ "doc:gen": "TEST2DOC=true playwright test --config=playwright-test2doc.config.ts --grep-invert @skip-docs"
172
172
  }
173
173
  ...
174
174
  }
@@ -361,9 +361,9 @@ To style the highlight and label we expose a few properties on the `annotation`
361
361
  - **Default**: `2`
362
362
 
363
363
  - **`position`**:
364
- - **Type**: `"above" | "below" | "left" | "right"`
365
- - **Description**: Determines the position of the label text relative to the highlighted element.
366
- - **Default**: `"below"` - automatically repositioned if insufficient space below the element.
364
+ - **Type**: `"above" | "below" | "left" | "right" | number`
365
+ - **Description**: Determines the position of the label text relative to the highlighted element. Uses clock convention where 0° = top, 90° = right, etc. If a number is provided, it positions the label at that degree angle. Defaults to automatically positioning towards the screen center.
366
+ - **Default**: Automatically positions label towards the center of the screen.
367
367
  - **`showArrow`**:
368
368
  - **Type**: `boolean`
369
369
  - **Description**: Whether to display an arrow pointing from the label to the highlighted element. When enabled, creates a visual connection between the annotation text and the target element.
@@ -439,7 +439,6 @@ export default defineConfig({
439
439
  })
440
440
  ```
441
441
 
442
-
443
442
  #### Highlight multiple elements
444
443
  In the event that you need to highlight multiple elements, you can pass in an array with `MultiLocatorScreenshot` objects.
445
444
 
@@ -469,7 +468,7 @@ test.describe(withDocMeta("describe block"), async () => {
469
468
  options: {
470
469
  annotation: {
471
470
  text: "Sidebar Element",
472
- position: "left",
471
+ position: 270,
473
472
  showArrow: true,
474
473
  arrowStrokeStyle: "red",
475
474
  },
package/dist/DocMeta.d.ts CHANGED
@@ -16,10 +16,12 @@ export type metadataType = "page" | "category";
16
16
  export declare const activateTest2Doc: () => void;
17
17
  /**
18
18
  * withDocMeta - Adds Docusaurus Page Meta Data to Playwright Describe Title when test2doc is active.
19
- * @param title - The title of the describe block.
19
+ * @param title - The title of the describe block. Used to name the document, e.g. `/test2doc-<kebab-case-title>` and populate the first Header (h1).
20
20
  * @param config - The Docusaurus Page Metadata configuration object.
21
21
  * For a list of fields for the config see https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter
22
22
  * @returns The title with appended JSON string of config if test2doc is active, otherwise just the title.
23
+ * @example
24
+ * withDocMeta("Title for Doc", { title: "Title for Sidebar", description: "Description of Doc." });
23
25
  */
24
26
  export declare const withDocMeta: (title: string, config: DocusaurusHeaderConfig) => string;
25
27
  interface DocusaurusCategoryLinkGeneratedIndex {
@@ -48,6 +50,15 @@ export interface DocusaurusCategoryMetadata {
48
50
  className?: string;
49
51
  customProps?: Record<string, unknown>;
50
52
  }
53
+ /**
54
+ * withDocCategory - Adds Docusaurus Category Metadata to Playwright Describe Title when test2doc is active.
55
+ * @param title Title of the describe block, used to name the category directory, e.g. `/test2doc-<category-name>`.
56
+ * @param metadata Docusaurus Category Metadata to populate the `_category_.json` file.
57
+ * For details on category metadata fields, see https://docusaurus.io/docs/sidebar/autogenerated#category-item-metadata
58
+ * @returns The title with appended JSON string of category config if test2doc is active, otherwise just the title.
59
+ * @example
60
+ * withDocCategory("User Authentication", { label: "Auth", position: 1 });
61
+ */
51
62
  export declare const withDocCategory: (title: string, metadata: DocusaurusCategoryMetadata) => string;
52
63
  export {};
53
64
  //# sourceMappingURL=DocMeta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocMeta.d.ts","sourceRoot":"","sources":["../src/DocMeta.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAA;CACpD;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,CAAA;AAM9C;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAE5B,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,QAAQ,sBAAsB,WACP,CAAA;AAQlE,UAAU,oCAAoC;IAC5C,IAAI,EAAE,iBAAiB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23 @@ export const activateTest2Doc = () => {
9
9
  };
10
10
  /**
11
11
  * withDocMeta - Adds Docusaurus Page Meta Data to Playwright Describe Title when test2doc is active.
12
- * @param title - The title of the describe block.
12
+ * @param title - The title of the describe block. Used to name the document, e.g. `/test2doc-<kebab-case-title>` and populate the first Header (h1).
13
13
  * @param config - The Docusaurus Page Metadata configuration object.
14
14
  * For a list of fields for the config see https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter
15
15
  * @returns The title with appended JSON string of config if test2doc is active, otherwise just the title.
16
+ * @example
17
+ * withDocMeta("Title for Doc", { title: "Title for Sidebar", description: "Description of Doc." });
16
18
  */
17
19
  export const withDocMeta = (title, config) => test2docActive ? addConfigToTitle(title, config, "page") : title;
18
20
  const addConfigToTitle = (title, config, metaType) => `${title}[test2doc_${metaType}]:${JSON.stringify(config)}`;
21
+ /**
22
+ * withDocCategory - Adds Docusaurus Category Metadata to Playwright Describe Title when test2doc is active.
23
+ * @param title Title of the describe block, used to name the category directory, e.g. `/test2doc-<category-name>`.
24
+ * @param metadata Docusaurus Category Metadata to populate the `_category_.json` file.
25
+ * For details on category metadata fields, see https://docusaurus.io/docs/sidebar/autogenerated#category-item-metadata
26
+ * @returns The title with appended JSON string of category config if test2doc is active, otherwise just the title.
27
+ * @example
28
+ * withDocCategory("User Authentication", { label: "Auth", position: 1 });
29
+ */
19
30
  export const withDocCategory = (title, metadata) => test2docActive ? addConfigToTitle(title, metadata, "category") : title;
20
31
  //# sourceMappingURL=DocMeta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DocMeta.js","sourceRoot":"","sources":["../src/DocMeta.ts"],"names":[],"mappings":"AAeA,0BAA0B;AAC1B,0GAA0G;AAC1G,IAAI,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,MAAM,CAAA;AAEvD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,cAAc,GAAG,IAAI,CAA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oCvE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAa,EACb,QAAoC,EAC5B,EAAE,CACV,cAAc,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA"}
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ class Test2DocReporter {
41
41
  buildTestDocTree(filename, tests) {
42
42
  const title = filename.match(/^(.*?)\.(test|spec)\.(ts|js)$/)?.[1] ?? filename;
43
43
  const docNode = {
44
- title: title,
44
+ title,
45
45
  children: [],
46
46
  tests: this.buildDocTests(tests),
47
47
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAM/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AA4ChC,0EAA0E;AAC1E,gBAAgB,EAAE,CAAA;AAElB;;;GAGG;AACH,MAAM,gBAAgB;IACZ,IAAI,GAAc,EAAE,CAAA;IACpB,MAAM,GAAmC,IAAI,GAAG,EAAE,CAAA;IAClD,SAAS,CAAQ;IACjB,mBAAmB,GAAoB,EAAE,CAAA;IACzC,cAAc,GAAG,IAAI,GAAG,EAAU,CAAA;IAClC,UAAU,GAAG,CAAC,CAAA;IACd,cAAc,GAAG,CAAC,CAAA;IAClB,WAAW,GAA8B,EAAE,CAAA;IAEnD,YACE,UAAmC;QACjC,SAAS,EAAE,QAAQ;KACpB;QAED,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,QAAQ,CAAA;IAChD,CAA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AAC;gBACrC,QAAQ,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA;YACrD,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,oDAAoD;IACpD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAA;AACnC,CAAC;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { Locator, Page, PageScreenshotOptions, TestInfo } from "@playwright/test";
2
- type Position = "above" | "below" | "left" | "right";
2
+ type Position = "above" | "below" | "left" | "right" | number;
3
3
  export interface AnnotationOptions {
4
4
  text?: string;
5
5
  fillStyle?: string;
@@ -24,6 +24,22 @@ interface MultiLocatorScreenshot {
24
24
  target: Locator;
25
25
  options?: ScreenshotOptions;
26
26
  }
27
+ /**
28
+ * Takes a screenshot of the specified target element(s) and attaches it to the test report.
29
+ * @param testInfo [The TestInfo object](https://playwright.dev/docs/api/class-testinfo) supplied from the test block, it is the second argument to the test function.
30
+ * @param target A [Page](https://playwright.dev/docs/api/class-page), [Locator](https://playwright.dev/docs/locators), or [Array of MultiLocatorScreenshot](https://github.com/dethstrobe/theDenverNexus/blob/main/packages/test2doc-playwright/README.md#highlight-multiple-elements) options
31
+ * @param screenshotOptions Screenshot options using [Playwright's PageScreenshotOptions](https://playwright.dev/docs/api/class-page#page-screenshot) and/or [Test2Doc's AnnotationOptions](https://github.com/dethstrobe/theDenverNexus/blob/main/packages/test2doc-playwright/README.md#annotation-object-properties) for annotation highlighting.
32
+ * @returns {Promise<void>} A Promise that resolves when the screenshot is taken and attached to the test report.
33
+ * @example
34
+ * // Single element with annotation
35
+ * screenshot(testInfo, page.getByRole("button", { name: "CTA" }), { annotation: { text: "Call to action" } });
36
+ * @example
37
+ * // Multiple elements with individual annotations
38
+ * screenshot(testInfo, [
39
+ * { target: page.getByRole("button", { name: "CTA" }), options: { annotation: { text: "Call to action" } } },
40
+ * { target: page.getByRole("heading", { name: "Welcome" }), options: { annotation: { text: "Main heading", position: "above" } } }
41
+ * ]);
42
+ */
27
43
  export declare const screenshot: (testInfo: TestInfo, target: Page | Locator | MultiLocatorScreenshot[], { annotation: overrideAnnotations, ...options }?: ScreenshotOptions) => Promise<void>;
28
44
  export {};
29
45
  //# sourceMappingURL=screenshots.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screenshots.d.ts","sourceRoot":"","sources":["../src/screenshots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,IAAI,EACJ,qBAAqB,EACrB,QAAQ,EACT,MAAM,kBAAkB,CAAA;AAIzB,KAAK,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;AAEpD,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,UAAU,iBAAkB,SAAQ,qBAAqB;IACvD,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B;AAED,UAAU,sBAAsB;IAC9B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AED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,GACrB,UAAU,QAAQ,EAClB,QAAQ,IAAI,GAAG,OAAO,GAAG,sBAAsB,EAAE,EACjD,kDAAiD,iBAAsB,KACtE,OAAO,CAAC,IAAI,CAqBd,CAAA"}
@@ -1,4 +1,20 @@
1
1
  let screenshotCounter = 0;
2
+ /**
3
+ * Takes a screenshot of the specified target element(s) and attaches it to the test report.
4
+ * @param testInfo [The TestInfo object](https://playwright.dev/docs/api/class-testinfo) supplied from the test block, it is the second argument to the test function.
5
+ * @param target A [Page](https://playwright.dev/docs/api/class-page), [Locator](https://playwright.dev/docs/locators), or [Array of MultiLocatorScreenshot](https://github.com/dethstrobe/theDenverNexus/blob/main/packages/test2doc-playwright/README.md#highlight-multiple-elements) options
6
+ * @param screenshotOptions Screenshot options using [Playwright's PageScreenshotOptions](https://playwright.dev/docs/api/class-page#page-screenshot) and/or [Test2Doc's AnnotationOptions](https://github.com/dethstrobe/theDenverNexus/blob/main/packages/test2doc-playwright/README.md#annotation-object-properties) for annotation highlighting.
7
+ * @returns {Promise<void>} A Promise that resolves when the screenshot is taken and attached to the test report.
8
+ * @example
9
+ * // Single element with annotation
10
+ * screenshot(testInfo, page.getByRole("button", { name: "CTA" }), { annotation: { text: "Call to action" } });
11
+ * @example
12
+ * // Multiple elements with individual annotations
13
+ * screenshot(testInfo, [
14
+ * { target: page.getByRole("button", { name: "CTA" }), options: { annotation: { text: "Call to action" } } },
15
+ * { target: page.getByRole("heading", { name: "Welcome" }), options: { annotation: { text: "Main heading", position: "above" } } }
16
+ * ]);
17
+ */
2
18
  export const screenshot = async (testInfo, target, { annotation: overrideAnnotations, ...options } = {}) => {
3
19
  const annotation = {
4
20
  ...(testInfo.project?.use?.test2doc?.annotationDefaults ?? {}),
@@ -63,99 +79,174 @@ async function generateScreenshotBuffer(targets, options, annotation) {
63
79
  const textHeight = actualBoundingBoxAscent + actualBoundingBoxDescent;
64
80
  const margin = annotation.showArrow ? 24 : 4;
65
81
  const padding = 4;
82
+ const centerBox = {
83
+ x: box.x + box.width / 2,
84
+ y: box.y + box.height / 2,
85
+ };
66
86
  const getPosition = (pos) => {
67
87
  if (pos)
68
88
  return pos;
69
- // TODO: adding padding/margin to calculations
70
- if (box.y - window.scrollY > window.innerHeight * 0.6) {
71
- return "above";
89
+ // Calculate angle from box center to screen center
90
+ const screenCenterX = window.innerWidth / 2;
91
+ const screenCenterY = window.innerHeight / 2;
92
+ // Calculate angle from box to screen center
93
+ const dx = screenCenterX - centerBox.x;
94
+ const dy = screenCenterY - centerBox.y;
95
+ // Convert to angle in degrees (0° = right, 90° = down, etc.)
96
+ let angle = Math.atan2(dy, dx) * (180 / Math.PI);
97
+ // Normalize to 0-360 range
98
+ if (angle < 0)
99
+ angle += 360;
100
+ // Convert from math convention (0° = right) to clock convention (0° = top)
101
+ // and return the angle directly
102
+ return (angle + 90) % 360;
103
+ };
104
+ const toDegree = (pos) => {
105
+ if (typeof pos === "number") {
106
+ // Convert clock convention (0° = top) to math convention (0° = right)
107
+ return (pos + 270) % 360;
72
108
  }
73
- if (box.y - textHeight < window.scrollY &&
74
- box.y + box.height + textHeight >
75
- window.innerHeight + window.scrollY) {
76
- if (box.x + box.width + textWidth < window.innerWidth) {
77
- return "right";
78
- }
79
- if (box.x - textWidth > 0) {
80
- return "left";
81
- }
109
+ switch (pos) {
110
+ case "above":
111
+ return 270;
112
+ case "right":
113
+ return 0;
114
+ case "below":
115
+ return 90;
116
+ case "left":
117
+ return 180;
118
+ default:
119
+ return 90;
82
120
  }
83
- return "below";
84
121
  };
85
- const position = getPosition(annotation.position);
86
- let labelPosition;
87
- switch (position) {
88
- case "above":
89
- labelPosition = {
90
- x: box.x + box.width / 2 - textWidth / 2,
91
- y: box.y - textHeight / 2 - padding / 2 - margin,
92
- };
93
- break;
94
- case "left":
95
- labelPosition = {
96
- x: box.x - textWidth - padding - margin,
97
- y: box.y + box.height / 2 + textHeight / 2,
98
- };
99
- break;
100
- case "right":
101
- labelPosition = {
102
- x: box.x + box.width + padding + margin,
103
- y: box.y + box.height / 2 + textHeight / 2,
104
- };
105
- break;
106
- default:
107
- labelPosition = {
108
- x: box.x + box.width / 2 - textWidth / 2,
109
- y: box.y + box.height + textHeight + padding + margin,
110
- };
111
- break;
122
+ const position = toDegree(getPosition(annotation.position));
123
+ function getLabelPosition(box, degree) {
124
+ const radians = (degree * Math.PI) / 180;
125
+ const sinT = Math.sin(radians);
126
+ const cosT = Math.cos(radians);
127
+ // Choose target lines
128
+ const yTop = box.y - (margin + padding) - textHeight / 2;
129
+ const yBottom = box.y + box.height + (margin + padding) + textHeight / 2;
130
+ const xLeft = box.x - textWidth / 2 - margin - padding;
131
+ const xRight = box.x + box.width + textWidth / 2 + margin + padding;
132
+ // Handle vertical rays (90° and 270°)
133
+ if (Math.abs(cosT) < 1e-6) {
134
+ const yTarget = sinT > 0 ? yBottom : yTop;
135
+ return { x: centerBox.x, y: yTarget };
136
+ }
137
+ // Handle horizontal rays (0° and 180°)
138
+ if (Math.abs(sinT) < 1e-6) {
139
+ const xTarget = cosT > 0 ? xRight : xLeft;
140
+ return { x: xTarget, y: centerBox.y };
141
+ }
142
+ // For diagonal rays, intersect with horizontal line
143
+ const yTarget = sinT < 0 ? yTop : yBottom;
144
+ const r = (yTarget - centerBox.y) / sinT;
145
+ let x = centerBox.x + r * cosT;
146
+ // If x goes out of bounds, intersect with vertical line instead
147
+ if (x < xLeft) {
148
+ x = xLeft;
149
+ const r2 = (x - centerBox.x) / cosT;
150
+ const y = centerBox.y + r2 * sinT;
151
+ return { x, y };
152
+ }
153
+ if (x > xRight) {
154
+ x = xRight;
155
+ const r2 = (x - centerBox.x) / cosT;
156
+ const y = centerBox.y + r2 * sinT;
157
+ return { x, y };
158
+ }
159
+ return { x, y: yTarget };
112
160
  }
161
+ const labelPosition = getLabelPosition(box, position);
113
162
  // Render arrow if enabled
114
163
  if (annotation.showArrow) {
115
- const arrowLabelEndX = position === "left"
116
- ? labelPosition.x + textWidth + padding
117
- : position === "right"
118
- ? labelPosition.x - padding / 2
119
- : // top or bottom
120
- labelPosition.x + textWidth / 2;
121
- const arrowLabelEndY = position === "above"
122
- ? labelPosition.y + padding / 2
123
- : position === "below"
124
- ? labelPosition.y - textHeight - padding / 2
125
- : // left or right
126
- box.y + box.height / 2;
127
- const arrowStartX = position === "left"
128
- ? box.x
129
- : position === "right"
130
- ? box.x + box.width
131
- : // top or bottom
132
- box.x + box.width / 2;
133
- const arrowStartY = position === "above"
134
- ? box.y
135
- : position === "below"
136
- ? box.y + box.height
137
- : // left or right
138
- box.y + box.height / 2;
139
164
  const arrowColor = annotation.arrowStrokeStyle ?? "rgba(255, 0, 0, 1)";
140
- ctx.strokeStyle = arrowColor;
141
- ctx.lineWidth = annotation.arrowLineWidth ?? 2;
142
- ctx.beginPath();
143
- ctx.moveTo(arrowLabelEndX, arrowLabelEndY);
144
- ctx.lineTo(arrowStartX, arrowStartY);
145
- ctx.stroke();
146
- // Draw arrowhead
147
- const angle = Math.atan2(arrowStartY - arrowLabelEndY, arrowStartX - arrowLabelEndX);
148
- const headLength = (annotation.arrowLineWidth ?? 2) * 5; // Length of the arrowhead
149
- ctx.fillStyle = arrowColor;
150
- ctx.lineJoin = "round";
151
- ctx.lineCap = "round";
152
- ctx.beginPath();
153
- ctx.moveTo(arrowStartX, arrowStartY);
154
- ctx.lineTo(arrowStartX - headLength * Math.cos(angle - Math.PI / 6), arrowStartY - headLength * Math.sin(angle - Math.PI / 6));
155
- ctx.lineTo(arrowStartX - headLength * Math.cos(angle + Math.PI / 6), arrowStartY - headLength * Math.sin(angle + Math.PI / 6));
156
- ctx.closePath();
157
- ctx.fill();
158
- ctx.stroke();
165
+ // Calculate the angle from label center to box center
166
+ const dx = centerBox.x - labelPosition.x;
167
+ const dy = centerBox.y - labelPosition.y;
168
+ const angle = Math.atan2(dy, dx);
169
+ // Calculate label box dimensions and position
170
+ const labelBoxX = labelPosition.x - textWidth / 2 - padding;
171
+ const labelBoxY = labelPosition.y - textHeight / 2 - padding;
172
+ const labelBoxWidth = textWidth + padding * 2;
173
+ const labelBoxHeight = textHeight + padding * 2;
174
+ // Function to find intersection of ray with rectangle
175
+ function getRayRectIntersection(rayX, rayY, // Ray origin
176
+ rayDx, rayDy, // Ray direction (normalized)
177
+ rectX, rectY, // Rectangle position
178
+ rectW, rectH) {
179
+ const candidates = [];
180
+ // Check intersection with each side of the rectangle
181
+ // Left side
182
+ if (rayDx !== 0) {
183
+ const t = (rectX - rayX) / rayDx;
184
+ const y = rayY + t * rayDy;
185
+ if (t > 0 && y >= rectY && y <= rectY + rectH) {
186
+ candidates.push({ x: rectX, y, t });
187
+ }
188
+ }
189
+ // Right side
190
+ if (rayDx !== 0) {
191
+ const t = (rectX + rectW - rayX) / rayDx;
192
+ const y = rayY + t * rayDy;
193
+ if (t > 0 && y >= rectY && y <= rectY + rectH) {
194
+ candidates.push({ x: rectX + rectW, y, t });
195
+ }
196
+ }
197
+ // Top side
198
+ if (rayDy !== 0) {
199
+ const t = (rectY - rayY) / rayDy;
200
+ const x = rayX + t * rayDx;
201
+ if (t > 0 && x >= rectX && x <= rectX + rectW) {
202
+ candidates.push({ x, y: rectY, t });
203
+ }
204
+ }
205
+ // Bottom side
206
+ if (rayDy !== 0) {
207
+ const t = (rectY + rectH - rayY) / rayDy;
208
+ const x = rayX + t * rayDx;
209
+ if (t > 0 && x >= rectX && x <= rectX + rectW) {
210
+ candidates.push({ x, y: rectY + rectH, t });
211
+ }
212
+ }
213
+ // Return the closest intersection
214
+ if (candidates.length === 0)
215
+ return null;
216
+ const closest = candidates.reduce((min, curr) => curr.t < min.t ? curr : min);
217
+ return { x: closest.x, y: closest.y };
218
+ }
219
+ // Calculate arrow start (edge of label box)
220
+ const rayDx = Math.cos(angle);
221
+ const rayDy = Math.sin(angle);
222
+ const arrowStart = getRayRectIntersection(labelPosition.x, labelPosition.y, // From label center
223
+ rayDx, rayDy, // Towards box center
224
+ labelBoxX, labelBoxY, labelBoxWidth, labelBoxHeight);
225
+ // Calculate arrow end (edge of highlight box)
226
+ const arrowEnd = getRayRectIntersection(centerBox.x, centerBox.y, // From box center
227
+ -rayDx, -rayDy, // Towards label center (opposite direction)
228
+ box.x, box.y, box.width, box.height);
229
+ if (arrowStart && arrowEnd) {
230
+ // Draw the arrow line
231
+ ctx.strokeStyle = arrowColor;
232
+ ctx.lineWidth = annotation.arrowLineWidth ?? 2;
233
+ ctx.beginPath();
234
+ ctx.moveTo(arrowStart.x, arrowStart.y);
235
+ ctx.lineTo(arrowEnd.x, arrowEnd.y);
236
+ ctx.stroke();
237
+ // Draw arrowhead at the highlight box edge
238
+ const headLength = (annotation.arrowLineWidth ?? 2) * 5;
239
+ ctx.fillStyle = arrowColor;
240
+ ctx.lineJoin = "round";
241
+ ctx.lineCap = "round";
242
+ ctx.beginPath();
243
+ ctx.moveTo(arrowEnd.x, arrowEnd.y);
244
+ ctx.lineTo(arrowEnd.x - headLength * Math.cos(angle - Math.PI / 6), arrowEnd.y - headLength * Math.sin(angle - Math.PI / 6));
245
+ ctx.lineTo(arrowEnd.x - headLength * Math.cos(angle + Math.PI / 6), arrowEnd.y - headLength * Math.sin(angle + Math.PI / 6));
246
+ ctx.closePath();
247
+ ctx.fill();
248
+ ctx.stroke();
249
+ }
159
250
  ctx.resetTransform();
160
251
  }
161
252
  // Draw label box
@@ -167,9 +258,9 @@ async function generateScreenshotBuffer(targets, options, annotation) {
167
258
  annotation.labelBoxStrokeStyle ?? "rgba(0, 0, 0, 0)";
168
259
  ctx.lineWidth = annotation.labelBoxLineWidth ?? 2;
169
260
  const paddingBothSides = padding * 2;
170
- const labelBoxX = labelPosition.x - padding;
261
+ const labelBoxX = labelPosition.x - textWidth / 2 - padding;
171
262
  const labelBoxY = labelPosition.y -
172
- textHeight +
263
+ textHeight / 2 +
173
264
  actualBoundingBoxDescent -
174
265
  padding;
175
266
  const labelBoxWidth = textWidth + paddingBothSides;
@@ -177,12 +268,14 @@ async function generateScreenshotBuffer(targets, options, annotation) {
177
268
  ctx.fillRect(labelBoxX, labelBoxY, labelBoxWidth, labelBoxHeight);
178
269
  ctx.strokeRect(labelBoxX, labelBoxY, labelBoxWidth, labelBoxHeight);
179
270
  }
271
+ const labelX = labelPosition.x - textWidth / 2;
272
+ const labelY = labelPosition.y + textHeight / 2 + actualBoundingBoxDescent;
180
273
  // Draw label text
181
274
  ctx.strokeStyle = annotation?.strokeStyle ?? "rgba(0, 0, 0, 0.1)";
182
275
  ctx.lineWidth = annotation?.lineWidth ?? 2;
183
- ctx.strokeText(annotation.text, labelPosition.x, labelPosition.y);
276
+ ctx.strokeText(annotation.text, labelX, labelY);
184
277
  ctx.fillStyle = annotation?.fillStyle ?? "rgba(0, 0, 0, 1)";
185
- ctx.fillText(annotation.text, labelPosition.x, labelPosition.y);
278
+ ctx.fillText(annotation.text, labelX, labelY);
186
279
  }
187
280
  }
188
281
  }
@@ -1 +1 @@
1
- {"version":3,"file":"screenshots.js","sourceRoot":"","sources":["../src/screenshots.ts"],"names":[],"mappings":"AAOA,IAAI,iBAAiB,GAAG,CAAC,CAAA;AA+BzB,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,QAAkB,EAClB,MAAiD,EACjD,EAAE,UAAU,EAAE,mBAAmB,EAAE,GAAG,OAAO,KAAwB,EAAE,EACvE,EAAE;IACF,MAAM,UAAU,GAAsB;QACpC,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,kBAAkB,IAAI,EAAE,CAAC;QAC9D,GAAG,mBAAmB;KACvB,CAAA;IAED,MAAM,QAAQ,GAAG,YAAY,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,iBAAiB,MAAM,CAAA;IAEpE,MAAM,gBAAgB,GACpB,WAAW,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAC5C,CAAC,CAAC,MAAM,wBAAwB,CAC5B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,C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AAW,IAAI,oBAAoB,CAAA;wBACjE,GAAG,CAAC,SAAS,GAAG,UAAU,EAAE,SAAS,IAAI,CAAC,CAAA;wBAC1C,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;wBAC/C,GAAG,CAAC,SAAS,GAAG,UAAU,EAAE,SAAS,IAAI,kBAAkB,CAAA;wBAC3D,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;oBAC/C,CAAC;gBACH,CAAC;YACH,CAAC;YAED,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;QACnC,CAAC,EACD,EAAE,aAAa,EAAE,WAAW,EAAE,CAC/B,CAAA;QAED,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAEvD,kBAAkB;QAClB,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACvB,MAAM,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,2BAA2B,CAAC,CAAA;YACnE,IAAI,MAAM;gBAAE,MAAM,CAAC,MAAM,EAAE,CAAA;QAC7B,CAAC,CAAC,CAAA;QAEF,OAAO,gBAAgB,CAAA;IACzB,CAAC;IAED,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AACvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@test2doc/playwright",
3
- "version": "0.13.1",
3
+ "version": "0.15.0",
4
4
  "description": "A reporter that generates docs based off playwright test files",
5
5
  "keywords": [
6
6
  "documentation",
@@ -60,18 +60,6 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "peerDependencies": {
64
- "@playwright/test": "^1.54.1"
65
- },
66
- "devDependencies": {
67
- "@playwright/test": "^1.55.0",
68
- "@types/node": "^24.5.0",
69
- "@types/pngjs": "^6.0.5",
70
- "pixelmatch": "^7.1.0",
71
- "pngjs": "^7.0.0",
72
- "typescript": "^5.9.2",
73
- "vitest": "^3.2.4"
74
- },
75
63
  "scripts": {
76
64
  "build": "tsc --project tsconfig.json",
77
65
  "build:watch": "tsc --project tsconfig.json --watch",
@@ -83,5 +71,17 @@
83
71
  "postinstall": "pnpm playwright install",
84
72
  "test": "vitest run && pnpm int && pnpm int:a",
85
73
  "unit": "vitest"
74
+ },
75
+ "peerDependencies": {
76
+ "@playwright/test": "^1.54.1"
77
+ },
78
+ "devDependencies": {
79
+ "@playwright/test": "^1.55.0",
80
+ "@types/node": "^24.5.0",
81
+ "@types/pngjs": "^6.0.5",
82
+ "pixelmatch": "^7.1.0",
83
+ "pngjs": "^7.0.0",
84
+ "typescript": "^5.9.2",
85
+ "vitest": "^3.2.4"
86
86
  }
87
- }
87
+ }
package/LICENSE DELETED
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [yyyy] [name of copyright owner]
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.