@wdio/visual-service 6.3.3 → 7.0.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/CHANGELOG.md +158 -1
- package/dist/contextManager.d.ts +15 -0
- package/dist/contextManager.d.ts.map +1 -0
- package/dist/contextManager.js +71 -0
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/service.d.ts +4 -2
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +209 -148
- package/dist/storybook/Types.d.ts +17 -4
- package/dist/storybook/Types.d.ts.map +1 -1
- package/dist/storybook/launcher.d.ts.map +1 -1
- package/dist/storybook/launcher.js +23 -0
- package/dist/storybook/utils.d.ts +4 -4
- package/dist/storybook/utils.d.ts.map +1 -1
- package/dist/storybook/utils.js +35 -13
- package/dist/types.d.ts +33 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +13 -20
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +87 -89
- package/dist/wrapWithContext.d.ts +8 -0
- package/dist/wrapWithContext.d.ts.map +1 -0
- package/dist/wrapWithContext.js +21 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,161 @@
|
|
|
1
1
|
# @wdio/visual-service
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 42956e4: ## 💥 BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
### 🔍 Viewport Screenshot Logic Reworked for Mobile Web & Hybrid Apps
|
|
10
|
+
|
|
11
|
+
#### What was the problem?
|
|
12
|
+
|
|
13
|
+
Screenshots for mobile devices were inconsistent due to platform differences. iOS captures the entire device screen (including status and address bars), while Android (using ChromeDriver) only captures the webview, unless the capability `"appium:nativeWebScreenshot": true` is used.
|
|
14
|
+
|
|
15
|
+
#### What changed?
|
|
16
|
+
|
|
17
|
+
We’ve reimplemented the logic to correctly handle both platforms by default.
|
|
18
|
+
This fix addresses [[#747](https://github.com/webdriverio/visual-testing/pull/747)](https://github.com/webdriverio/visual-testing/pull/747).
|
|
19
|
+
|
|
20
|
+
💡 Credit to [Benjamin Karran (@ebekebe)](https://github.com/ebekebe) for pointing us in the right direction to improve this logic!
|
|
21
|
+
|
|
22
|
+
#### What’s the advantage?
|
|
23
|
+
|
|
24
|
+
✅ More **accurate full-page and element screenshots** on both Android and iOS.
|
|
25
|
+
⚠️ But this change may **break your current baselines**, especially on Android and iOS.
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### 🍏 iOS Element Screenshot Strategy Changed
|
|
30
|
+
|
|
31
|
+
#### What was the problem?
|
|
32
|
+
|
|
33
|
+
iOS element screenshots were previously cut from full-device screenshots, which could lead to misalignment or off-by-a-few-pixels issues.
|
|
34
|
+
|
|
35
|
+
#### What changed?
|
|
36
|
+
|
|
37
|
+
We now use the element screenshot endpoint directly.
|
|
38
|
+
|
|
39
|
+
#### What’s the advantage?
|
|
40
|
+
|
|
41
|
+
✅ More accurate iOS element screenshots.
|
|
42
|
+
⚠️ But again, this may affect your existing baselines.
|
|
43
|
+
|
|
44
|
+
***
|
|
45
|
+
|
|
46
|
+
### 🖥️ New Full-Page Screenshot Strategy for **Desktop Web**
|
|
47
|
+
|
|
48
|
+
#### What was the problem?
|
|
49
|
+
|
|
50
|
+
The "previous" scroll-and-stitch method simulated user interaction by scrolling the page, waiting, taking a screenshot, and repeating until the entire page was captured.
|
|
51
|
+
This works well for **lazy-loaded content**, but it is **slow and unstable** on other pages.
|
|
52
|
+
|
|
53
|
+
#### What changed?
|
|
54
|
+
|
|
55
|
+
We now use WebDriver BiDi’s [`[browsingContext.captureScreenshot](https://webdriver.io/docs/api/webdriverBidi#browsingcontextcapturescreenshot)`] to capture **full-page screenshots in one go**. This is the new **default strategy for desktop web browsers**.
|
|
56
|
+
|
|
57
|
+
📌 **Mobile platforms (iOS/Android)** still use the scroll-and-stitch approach for now.
|
|
58
|
+
|
|
59
|
+
#### What’s the advantage?
|
|
60
|
+
|
|
61
|
+
✅ Execution time reduced by **50%+**
|
|
62
|
+
✅ Logic is greatly simplified
|
|
63
|
+
✅ More consistent and stable results on static or non-lazy pages
|
|
64
|
+
📸 
|
|
65
|
+
|
|
66
|
+
**Still want the old scroll-and-stitch behavior or need fullpage screenshots for pages who have lazy-loading?**
|
|
67
|
+
|
|
68
|
+
Use the `userBasedFullPageScreenshot` option to simulate user-like scrolling. This remains the **better choice for pages with lazy-loading**:
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
// wdio.conf.ts
|
|
72
|
+
services: [
|
|
73
|
+
[
|
|
74
|
+
"visual",
|
|
75
|
+
{
|
|
76
|
+
userBasedFullPageScreenshot: true,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
];
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Or per test:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
await expect(browser).toMatchFullPageSnapshot("homepage", {
|
|
86
|
+
userBasedFullPageScreenshot: true,
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
***
|
|
91
|
+
|
|
92
|
+
## 💅 Polish
|
|
93
|
+
|
|
94
|
+
### ⚠️ Deprecated Root-Level Compare Options
|
|
95
|
+
|
|
96
|
+
#### What was the problem?
|
|
97
|
+
|
|
98
|
+
Compare options were allowed at the root level of the service config, making them harder to group or discover.
|
|
99
|
+
|
|
100
|
+
#### What changed?
|
|
101
|
+
|
|
102
|
+
You now get a warning if you still use root-level keys. Please move them under the `compareOptions` property instead.
|
|
103
|
+
|
|
104
|
+
**Example warning:**
|
|
105
|
+
|
|
106
|
+
```log
|
|
107
|
+
WARN The following root-level compare options are deprecated and should be moved under 'compareOptions':
|
|
108
|
+
- blockOutStatusBar
|
|
109
|
+
- ignoreColors
|
|
110
|
+
In the next major version, these options will be removed from the root level.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
📘 See: [[compareOptions docs](https://webdriver.io/docs/visual-testing/service-options#compare-options)](https://webdriver.io/docs/visual-testing/service-options#compare-options)
|
|
114
|
+
|
|
115
|
+
***
|
|
116
|
+
|
|
117
|
+
## 🐛 Bug Fixes
|
|
118
|
+
|
|
119
|
+
- ✅ [[#747](https://github.com/your-repo/issues/747)](https://github.com/your-repo/issues/747): Fixed incorrect mobile webview context data.
|
|
120
|
+
|
|
121
|
+
***
|
|
122
|
+
|
|
123
|
+
## 🔧 Other
|
|
124
|
+
|
|
125
|
+
- 🆙 Updated dependencies
|
|
126
|
+
- 🧪 Improved test coverage
|
|
127
|
+
- 📸 Refreshed image baselines
|
|
128
|
+
|
|
129
|
+
***
|
|
130
|
+
|
|
131
|
+
## Committers: 1
|
|
132
|
+
|
|
133
|
+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- Updated dependencies [42956e4]
|
|
138
|
+
- webdriver-image-comparison@8.0.0
|
|
139
|
+
|
|
140
|
+
## 6.4.0
|
|
141
|
+
|
|
142
|
+
### Minor Changes
|
|
143
|
+
|
|
144
|
+
- 7f859aa: Add `additionalSearchParams` to the Storybook Runner API
|
|
145
|
+
- 307fbec: Add `getStoriesBaselinePath` to Storybook Runner API, enabling custom file paths (e.g. files with a flat hierarchy in the baselines folder)
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- 3d232d1: Fix compareOptions not passed from config to the storybook runner tests
|
|
150
|
+
- Updated dependencies [7f859aa]
|
|
151
|
+
- Updated dependencies [307fbec]
|
|
152
|
+
- webdriver-image-comparison@7.4.0
|
|
153
|
+
|
|
154
|
+
### Committers: 2
|
|
155
|
+
|
|
156
|
+
- Fábio Correia [@fabioatcorreia](https://github.com/fabioatcorreia)
|
|
157
|
+
- alcpereira ([@alcpereira](https://github.com/alcpereira))
|
|
158
|
+
|
|
3
159
|
## 6.3.3
|
|
4
160
|
|
|
5
161
|
### Patch Changes
|
|
@@ -8,7 +164,8 @@
|
|
|
8
164
|
|
|
9
165
|
### Committers: 1
|
|
10
166
|
|
|
11
|
-
-
|
|
167
|
+
- alcpereira ([@ alcpereira](https://github.com/alcpereira))
|
|
168
|
+
|
|
12
169
|
## 6.3.2
|
|
13
170
|
|
|
14
171
|
### Patch Changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DeviceRectangles } from 'webdriver-image-comparison';
|
|
2
|
+
export declare class ContextManager {
|
|
3
|
+
#private;
|
|
4
|
+
private cachedViewport;
|
|
5
|
+
constructor(browser: WebdriverIO.Browser);
|
|
6
|
+
getViewportContext(): DeviceRectangles;
|
|
7
|
+
setViewPortContext(viewport: DeviceRectangles): void;
|
|
8
|
+
get browser(): WebdriverIO.Browser;
|
|
9
|
+
get needsUpdate(): boolean;
|
|
10
|
+
markForUpdate(): void;
|
|
11
|
+
setCurrentContext(context: string): void;
|
|
12
|
+
getCurrentContext(): Promise<string | undefined>;
|
|
13
|
+
get isNativeContext(): boolean;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=contextManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextManager.d.ts","sourceRoot":"","sources":["../src/contextManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAMlE,qBAAa,cAAc;;IAKvB,OAAO,CAAC,cAAc,CAAsC;gBAEhD,OAAO,EAAE,WAAW,CAAC,OAAO;IAOxC,kBAAkB,IAAI,gBAAgB;IAItC,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAKpD,IAAI,OAAO,IAAI,WAAW,CAAC,OAAO,CAEjC;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,aAAa,IAAI,IAAI;IAIrB,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAO3B,iBAAiB;IAIvB,IAAI,eAAe,YAElB;CA0BJ"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import logger from '@wdio/logger';
|
|
2
|
+
import { DEVICE_RECTANGLES } from 'webdriver-image-comparison';
|
|
3
|
+
import { getNativeContext } from './utils.js';
|
|
4
|
+
const log = logger('@wdio/visual-service:ContextManager');
|
|
5
|
+
export class ContextManager {
|
|
6
|
+
#browser;
|
|
7
|
+
#needsUpdate = false;
|
|
8
|
+
#currentContext;
|
|
9
|
+
#isNativeContext;
|
|
10
|
+
cachedViewport = DEVICE_RECTANGLES;
|
|
11
|
+
constructor(browser) {
|
|
12
|
+
this.#browser = browser;
|
|
13
|
+
const capabilities = this.#browser.requestedCapabilities;
|
|
14
|
+
this.#isNativeContext = getNativeContext({ capabilities, isMobile: this.#browser.isMobile });
|
|
15
|
+
this.#browser.on('result', this.#onCommandResult.bind(this));
|
|
16
|
+
}
|
|
17
|
+
getViewportContext() {
|
|
18
|
+
return this.cachedViewport;
|
|
19
|
+
}
|
|
20
|
+
setViewPortContext(viewport) {
|
|
21
|
+
this.cachedViewport = viewport;
|
|
22
|
+
this.#needsUpdate = false;
|
|
23
|
+
}
|
|
24
|
+
get browser() {
|
|
25
|
+
return this.#browser;
|
|
26
|
+
}
|
|
27
|
+
get needsUpdate() {
|
|
28
|
+
return this.#needsUpdate;
|
|
29
|
+
}
|
|
30
|
+
markForUpdate() {
|
|
31
|
+
this.#needsUpdate = true;
|
|
32
|
+
}
|
|
33
|
+
setCurrentContext(context) {
|
|
34
|
+
this.#currentContext = context;
|
|
35
|
+
if (this.#browser.isMobile) {
|
|
36
|
+
this.#isNativeContext = context ? context === 'NATIVE_APP' : this.#isNativeContext;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async getCurrentContext() {
|
|
40
|
+
return this.#currentContext;
|
|
41
|
+
}
|
|
42
|
+
get isNativeContext() {
|
|
43
|
+
return this.#isNativeContext;
|
|
44
|
+
}
|
|
45
|
+
async #onCommandResult(event) {
|
|
46
|
+
const commands = ['switchAppiumContext', 'switchContext', 'setOrientation'];
|
|
47
|
+
if (commands.includes(event.command)) {
|
|
48
|
+
const { body: { name, orientation }, result } = event;
|
|
49
|
+
// Check if result exists and is not an error object
|
|
50
|
+
// @ts-expect-error
|
|
51
|
+
const isSuccess = result && !result.error && typeof result === 'object';
|
|
52
|
+
if (isSuccess) {
|
|
53
|
+
if (event.command === 'setOrientation') {
|
|
54
|
+
log.info(`Device rotation to "${orientation}" detected, context will need recalculation.`);
|
|
55
|
+
this.markForUpdate();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
if (name && name !== 'NATIVE_APP') {
|
|
59
|
+
log.info(`Context changed to "${name}", context will need recalculation.`);
|
|
60
|
+
this.markForUpdate();
|
|
61
|
+
}
|
|
62
|
+
// Set the context to the current context
|
|
63
|
+
this.setCurrentContext(name);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
log.warn('Orientation set failed: \n', result, '\nWe could not recalibrate the context');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -90,12 +90,6 @@ declare global {
|
|
|
90
90
|
toMatchTabbablePageSnapshot(tag: string, expectedResult?: number | ExpectWebdriverIO.PartialMatcher, options?: WdioCheckFullPageMethodOptions): R;
|
|
91
91
|
toMatchTabbablePageSnapshot(tag: string, options?: WdioCheckFullPageMethodOptions): R;
|
|
92
92
|
}
|
|
93
|
-
interface PartialMatcher {
|
|
94
|
-
sample?: any;
|
|
95
|
-
$$typeof: symbol;
|
|
96
|
-
asymmetricMatch(...args: any[]): boolean;
|
|
97
|
-
toString(): string;
|
|
98
|
-
}
|
|
99
93
|
}
|
|
100
94
|
}
|
|
101
95
|
export type { VisualServiceOptions };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names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C,EAAE,4BAA4B,GACvC,CAAC,CAAA;YACJ;;;;;eAKG;YACH,uBAAuB,CACnB,GAAG,EAAE,MAAM,EACX,cAAc,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC,cAAc,EAC1D,OAAO,CAAC,EAAE,8BAA8B,GACzC,CAAC,CAAA;YACJ,uBAAuB,CACnB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,8BAA8B,GACzC,CAAC,CAAA;YACJ;;;;;eAKG;YACH,sBAAsB,CAClB,GAAG,EAAE,MAAM,EACX,cAAc,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC,cAAc,EAC1D,OAAO,CAAC,EAAE,6BAA6B,GACxC,CAAC,CAAA;YACJ,sBAAsB,CAClB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,6BAA6B,GACxC,CAAC,CAAA;YACJ;;;;;eAKG;YACH,2BAA2B,CACvB,GAAG,EAAE,MAAM,EACX,cAAc,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC,cAAc,EAC1D,OAAO,CAAC,EAAE,8BAA8B,GACzC,CAAC,CAAA;YACJ,2BAA2B,CACvB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,8BAA8B,GACzC,CAAC,CAAA;SACP;KACJ;CACJ;AACD,YAAY,EAAE,oBAAoB,EAAE,CAAA;AAEpC,eAAe,0BAA0B,CAAA;AACzC,eAAO,MAAM,QAAQ,uBAAiB,CAAA"}
|
package/dist/service.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { Frameworks } from '@wdio/types';
|
|
2
2
|
import { BaseClass } from 'webdriver-image-comparison';
|
|
3
3
|
import type { VisualServiceOptions } from './types.js';
|
|
4
|
+
import { ContextManager } from './contextManager.js';
|
|
4
5
|
export default class WdioImageComparisonService extends BaseClass {
|
|
5
6
|
#private;
|
|
6
|
-
private
|
|
7
|
+
private _contextManager?;
|
|
8
|
+
private _contextManagers?;
|
|
7
9
|
constructor(options: VisualServiceOptions, _: WebdriverIO.Capabilities, config: WebdriverIO.Config);
|
|
8
10
|
/**
|
|
9
11
|
* Set up the service if users want to use it in standalone mode
|
|
@@ -12,6 +14,6 @@ export default class WdioImageComparisonService extends BaseClass {
|
|
|
12
14
|
before(capabilities: WebdriverIO.Capabilities, _specs: string[], browser: WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser): Promise<void>;
|
|
13
15
|
beforeTest(test: Frameworks.Test): Promise<void>;
|
|
14
16
|
beforeScenario(world: Frameworks.World): void;
|
|
15
|
-
|
|
17
|
+
get contextManager(): ContextManager;
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=service.d.ts.map
|
package/dist/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,UAAU,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EACH,SAAS,EAWZ,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAgB,UAAU,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EACH,SAAS,EAWZ,MAAM,4BAA4B,CAAA;AAkBnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAepD,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,SAAS;;IAM7D,OAAO,CAAC,eAAe,CAAC,CAAgB;IACxC,OAAO,CAAC,gBAAgB,CAAC,CAAyC;gBAEtD,OAAO,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM;IAMlG;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,kBAAkB;IAIzE,MAAM,CACR,YAAY,EAAE,WAAW,CAAC,YAAY,EACtC,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,kBAAkB;IA2B3D,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI;IAOtC,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK;IAictC,IAAI,cAAc,IAAI,cAAc,CAKnC;CACJ"}
|