@test2doc/playwright 0.5.6 → 0.6.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 +22 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -267,4 +267,26 @@ test.describe(withDocMeta("describe block"), async () => {
|
|
|
267
267
|
})
|
|
268
268
|
})
|
|
269
269
|
})
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
##### Add a label while highlighting an element
|
|
273
|
+
In case the highlight is not enough, you can add a label under the highlighted element.
|
|
274
|
+
|
|
275
|
+
```ts
|
|
276
|
+
import { screenshot } from "@test2doc/playwright/screenshots"
|
|
277
|
+
...
|
|
278
|
+
|
|
279
|
+
test.describe(withDocMeta("describe block"), async () => {
|
|
280
|
+
test("test block", async ({ page }, testInfo) => {
|
|
281
|
+
...
|
|
282
|
+
test.step("step block", async () => {
|
|
283
|
+
await page.goto("http://localhost:5173/")
|
|
284
|
+
await screenshot(
|
|
285
|
+
testInfo,
|
|
286
|
+
page.getByRole("header", {name: "Page Title"},
|
|
287
|
+
{ label: { text: "Heading of the Page" } }
|
|
288
|
+
))
|
|
289
|
+
})
|
|
290
|
+
})
|
|
291
|
+
})
|
|
270
292
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@test2doc/playwright",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "A reporter that generates docs based off playwright test files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation",
|
|
@@ -59,14 +59,17 @@
|
|
|
59
59
|
"@playwright/test": "^1.54.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"
|
|
63
|
-
"@types/node": "^24.0.4"
|
|
62
|
+
"@playwright/test": "^1.55.0",
|
|
63
|
+
"@types/node": "^24.0.4",
|
|
64
|
+
"vitest": "^3.2.4"
|
|
64
65
|
},
|
|
65
66
|
"scripts": {
|
|
66
67
|
"clean": "rm -rf dist",
|
|
67
68
|
"build": "tsc --project tsconfig.json",
|
|
68
69
|
"build:watch": "tsc --project tsconfig.json --watch",
|
|
69
|
-
"test": "vitest",
|
|
70
|
+
"test": "vitest run && pnpm int",
|
|
71
|
+
"unit": "vitest",
|
|
72
|
+
"int": "playwright test",
|
|
70
73
|
"lint": "biome lint .",
|
|
71
74
|
"format": "biome format --write ."
|
|
72
75
|
}
|