Skip to content

fix(wdio): don't scale browser in headless mode#8033

Merged
sheremet-va merged 9 commits intovitest-dev:mainfrom
sheremet-va:fix/browser-wdio-scaling
May 28, 2025
Merged

fix(wdio): don't scale browser in headless mode#8033
sheremet-va merged 9 commits intovitest-dev:mainfrom
sheremet-va:fix/browser-wdio-scaling

Conversation

@sheremet-va
Copy link
Copy Markdown
Member

Description

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link
Copy Markdown

netlify bot commented May 26, 2025

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit b1cf491
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6835cbca8680520008eadbdb
😎 Deploy Preview https://deploy-preview-8033--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va sheremet-va requested a review from hi-ogawa May 26, 2025 14:13
hi-ogawa
hi-ogawa previously approved these changes May 27, 2025

await expect.element(secondPost.getByRole('heading')).toHaveTextContent('qui est esse')

// TODO: click doesn't work on webdriverio when iframe is scaled
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically the scaling issue still exists for with headed UI. This test still fails locally with:

PROVIDER=webdriverio BROWSER=chrome pnpm -C test/browser test-locators --browser.headless=false

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I noticed that headless sometimes works differently, but seems like the positions are always incorrect even in dev, you are right. I will revert the scaling for webdriverio provider for now, and we can investigate other solutions later

@sheremet-va sheremet-va requested a review from hi-ogawa May 27, 2025 14:29
@sheremet-va
Copy link
Copy Markdown
Member Author

TODO: need to check if playwright and preview keeps working correctly after the webdriverio changes

Copy link
Copy Markdown
Collaborator

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed PROVIDER=webdriverio BROWSER=chrome pnpm -C test/browser test-locators --browser.headless=false passed locally 👍

@sheremet-va sheremet-va merged commit c23b0f7 into vitest-dev:main May 28, 2025
13 checks passed
@sheremet-va sheremet-va deleted the fix/browser-wdio-scaling branch May 28, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants