fix(browser): revert the viewport scaling in non-ui mode #9018 (#9072)

This commit is contained in:
Vladimir 2025-11-25 11:02:29 +01:00 committed by GitHub
parent c37c2eb0b5
commit 64502a2c4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -365,10 +365,11 @@ export class PlaywrightBrowserProvider implements BrowserProvider {
if (this.project.config.browser.ui) {
options.viewport = null
}
else {
// if UI is disabled, keep the iframe scale to 1
options.viewport ??= this.project.config.browser.viewport
}
// TODO: investigate the consequences for Vitest 5
// else {
// if UI is disabled, keep the iframe scale to 1
// options.viewport ??= this.project.config.browser.viewport
// }
const context = await browser.newContext(options)
await this._throwIfClosing(context)
if (actionTimeout != null) {