Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(browser): scale iframe for non ui case #6512

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Sep 15, 2024

Description

The test case I added is failing on webdriverio regardless of with or without UI. I couldn't figure out webdriverio, so this PR only fixes playwright where it has inconsistency with or without UI.

todo

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:.

@hi-ogawa hi-ogawa changed the title fix(browser): fix viewport for non ui case fix(browser): fix viewport for non ui case on playwright provider Sep 15, 2024
@hi-ogawa hi-ogawa marked this pull request as ready for review September 15, 2024 10:07
Copy link
Member

@sheremet-va sheremet-va left a comment

Choose a reason for hiding this comment

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

This doesn't fix it when you call page.viewport

We already experimented with this before. Now we just need to keep the same iframe scaling that we have in ui

@hi-ogawa
Copy link
Contributor Author

This doesn't fix it when you call page.viewport

Ah, I didn't think about that. I've read #6257 and scaling seems more involved but I'll see what I can do.

@hi-ogawa hi-ogawa marked this pull request as draft September 17, 2024 06:56
Copy link

netlify bot commented Sep 18, 2024

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a82ae78
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/67107c43b2c76d000827d8c0
😎 Deploy Preview https://deploy-preview-6512--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 site configuration.

@hi-ogawa hi-ogawa changed the title fix(browser): fix viewport for non ui case on playwright provider fix(browser): scale iframe for non ui case Sep 18, 2024
Copy link
Contributor Author

@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.

Only Mac chromium playwright is timing out with specs/runner.test.ts https://github.com/vitest-dev/vitest/actions/runs/10915841527/job/30296283296?pr=6512#step:9:24

I cannot reproduce it locally on my Linux chromium headless, so it's hard to diagnose what's wrong. I would appreciate if someone can check it on Mac machine locally.

test/browser/test/userEvent.test.ts Show resolved Hide resolved
packages/browser/src/client/orchestrator.ts Outdated Show resolved Hide resolved
@hi-ogawa hi-ogawa mentioned this pull request Oct 3, 2024
6 tasks
Copy link

pkg-pr-new bot commented Oct 13, 2024

@vitest/coverage-istanbul

pnpm add https://pkg.pr.new/@vitest/coverage-istanbul@6512

@vitest/coverage-v8

pnpm add https://pkg.pr.new/@vitest/coverage-v8@6512

@vitest/expect

pnpm add https://pkg.pr.new/@vitest/expect@6512

@vitest/pretty-format

pnpm add https://pkg.pr.new/@vitest/pretty-format@6512

@vitest/mocker

pnpm add https://pkg.pr.new/@vitest/mocker@6512

@vitest/spy

pnpm add https://pkg.pr.new/@vitest/spy@6512

@vitest/snapshot

pnpm add https://pkg.pr.new/@vitest/snapshot@6512

@vitest/runner

pnpm add https://pkg.pr.new/@vitest/runner@6512

@vitest/utils

pnpm add https://pkg.pr.new/@vitest/utils@6512

@vitest/ui

pnpm add https://pkg.pr.new/@vitest/ui@6512

vite-node

pnpm add https://pkg.pr.new/vite-node@6512

@vitest/web-worker

pnpm add https://pkg.pr.new/@vitest/web-worker@6512

@vitest/ws-client

pnpm add https://pkg.pr.new/@vitest/ws-client@6512

vitest

pnpm add https://pkg.pr.new/vitest@6512

@vitest/browser

pnpm add https://pkg.pr.new/@vitest/browser@6512

commit: a82ae78

@hi-ogawa
Copy link
Contributor Author

@sheremet-va I did some CI debugging, but couldn't figure out mac chromium fail. The CI log suggests test/browser/test/... hangs somewhere and it might be reproduced locally with headless or non ui. Can you try this on your PC?

# or --browser.ui=false
pnpm -C test/browser test-fixtures --browser.headless=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browser viewport does not match iframe viewport when the UI is disabled
2 participants