@vitest/browser-playwright 4.0.9 → 4.0.10
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/dist/index.js +4 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -514,7 +514,7 @@ async function takeScreenshot(context, name, options) {
|
|
|
514
514
|
}
|
|
515
515
|
const mask = options.mask?.map((selector) => context.iframe.locator(selector));
|
|
516
516
|
if (options.element) {
|
|
517
|
-
const { element: selector
|
|
517
|
+
const { element: selector, ...config } = options;
|
|
518
518
|
const element = context.iframe.locator(selector);
|
|
519
519
|
const buffer = await element.screenshot({
|
|
520
520
|
...config,
|
|
@@ -956,6 +956,9 @@ class PlaywrightBrowserProvider {
|
|
|
956
956
|
};
|
|
957
957
|
if (this.project.config.browser.ui) {
|
|
958
958
|
options.viewport = null;
|
|
959
|
+
} else {
|
|
960
|
+
// if UI is disabled, keep the iframe scale to 1
|
|
961
|
+
options.viewport ??= this.project.config.browser.viewport;
|
|
959
962
|
}
|
|
960
963
|
const context = await browser.newContext(options);
|
|
961
964
|
await this._throwIfClosing(context);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/browser-playwright",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.10",
|
|
5
5
|
"description": "Browser running for Vitest using playwright",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
],
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"playwright": "*",
|
|
45
|
-
"vitest": "4.0.
|
|
45
|
+
"vitest": "4.0.10"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"playwright": {
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"tinyrainbow": "^3.0.3",
|
|
54
|
-
"@vitest/
|
|
55
|
-
"@vitest/
|
|
54
|
+
"@vitest/mocker": "4.0.10",
|
|
55
|
+
"@vitest/browser": "4.0.10"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"playwright": "^1.56.1",
|
|
59
|
-
"vitest": "4.0.
|
|
59
|
+
"vitest": "4.0.10"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "premove dist && pnpm rollup -c",
|