@augment-vir/test 31.63.0 → 31.64.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.
|
@@ -14,6 +14,13 @@ declare function importWebTestApi(this: void): Promise<RuntimeEnvError | {
|
|
|
14
14
|
ensureFocus: typeof import("../test-web/element-test-focus.js").focusElement;
|
|
15
15
|
/** Moves the mouse to the center of the given element. */
|
|
16
16
|
moveMouseTo: typeof import("../test-web/click-element.js").moveToElement;
|
|
17
|
+
/**
|
|
18
|
+
* Test a screenshot against an already established screenshot.
|
|
19
|
+
*
|
|
20
|
+
* To update screenshots, run the test command with `--update` or
|
|
21
|
+
* `--update-visual-baseline`.
|
|
22
|
+
*/
|
|
23
|
+
testScreenshot: typeof import("../test-web/test-screenshot.js").testScreenshot;
|
|
17
24
|
/**
|
|
18
25
|
* Renders a string or TemplateResult and puts it in the DOM via a fixtureWrapper.
|
|
19
26
|
*
|
|
@@ -9,6 +9,7 @@ async function importWebTestApi() {
|
|
|
9
9
|
const { fixtureCleanup, fixture } = await import('@open-wc/testing-helpers');
|
|
10
10
|
const { renderElement } = await import('../test-web/render-element.js');
|
|
11
11
|
const { elementCases } = await import('../test-web/element-cases.js');
|
|
12
|
+
const { testScreenshot } = await import('../test-web/test-screenshot.js');
|
|
12
13
|
return {
|
|
13
14
|
/**
|
|
14
15
|
* Cleans up all rendered test HTML by removing the actual wrapper nodes. Common use case is
|
|
@@ -23,6 +24,13 @@ async function importWebTestApi() {
|
|
|
23
24
|
ensureFocus: focusElement,
|
|
24
25
|
/** Moves the mouse to the center of the given element. */
|
|
25
26
|
moveMouseTo: moveToElement,
|
|
27
|
+
/**
|
|
28
|
+
* Test a screenshot against an already established screenshot.
|
|
29
|
+
*
|
|
30
|
+
* To update screenshots, run the test command with `--update` or
|
|
31
|
+
* `--update-visual-baseline`.
|
|
32
|
+
*/
|
|
33
|
+
testScreenshot,
|
|
26
34
|
/**
|
|
27
35
|
* Renders a string or TemplateResult and puts it in the DOM via a fixtureWrapper.
|
|
28
36
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function testScreenshot(element: Node, screenshotName: string): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/test",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.64.0",
|
|
4
4
|
"description": "A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"test",
|
|
@@ -44,20 +44,21 @@
|
|
|
44
44
|
"test:web": "virmator test --no-deps web 'src/test-web/**/*.test.ts' 'src/augments/universal-testing-suite/**/*.test.ts'"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@augment-vir/assert": "^31.
|
|
48
|
-
"@augment-vir/common": "^31.
|
|
49
|
-
"@date-vir/duration": "^8.1.
|
|
50
|
-
"@virmator/test": "^14.5.
|
|
47
|
+
"@augment-vir/assert": "^31.64.0",
|
|
48
|
+
"@augment-vir/common": "^31.64.0",
|
|
49
|
+
"@date-vir/duration": "^8.1.1",
|
|
50
|
+
"@virmator/test": "^14.5.5",
|
|
51
51
|
"type-fest": "^5.4.4"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@open-wc/testing-helpers": "^3.0.1",
|
|
55
55
|
"@playwright/test": "^1.58.2",
|
|
56
|
-
"@types/node": "^25.0
|
|
56
|
+
"@types/node": "^25.3.0",
|
|
57
57
|
"@web/dev-server-esbuild": "^1.0.5",
|
|
58
58
|
"@web/test-runner": "^0.20.2",
|
|
59
59
|
"@web/test-runner-commands": "^0.9.0",
|
|
60
60
|
"@web/test-runner-playwright": "^0.11.1",
|
|
61
|
+
"@web/test-runner-visual-regression": "^0.10.0",
|
|
61
62
|
"element-vir": "^26.14.3",
|
|
62
63
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
63
64
|
"pixelmatch": "^7.1.0",
|
|
@@ -71,6 +72,8 @@
|
|
|
71
72
|
"peerDependencies": {
|
|
72
73
|
"@open-wc/testing-helpers": "*",
|
|
73
74
|
"@playwright/test": "*",
|
|
75
|
+
"@web/test-runner-commands": "*",
|
|
76
|
+
"@web/test-runner-visual-regression": "*",
|
|
74
77
|
"element-vir": "*",
|
|
75
78
|
"pixelmatch": ">=5",
|
|
76
79
|
"pngjs": ">=7",
|