testing-library / testing-library-recorder-extension

Testing Library Extension for Chrome DevTools Recorder
https://chrome.google.com/webstore/detail/testing-library-recorder/pnobfbfcnoeealajjgnpeodbkkhgiici?utm_source=github&utm_medium=referral
MIT License
144 stars 3 forks source link

Support setting viewport size #11

Open jecfish opened 1 year ago

jecfish commented 1 year ago

The Recorder contains details to set viewport size. This step is not exported.

{
      "type": "setViewport",
      "width": 375,
      "height": 667,
      "deviceScaleFactor": 1,
      "isMobile": false,
      "hasTouch": false,
      "isLandscape": false
    },
nickmccurdy commented 1 year ago

Answered in DMs, but reposting for historical purposes:

Yea that's intentional. It's because it's currently using JSDOM (the most common environment for Testing Library) which doesn't implement layout.

I plan on looking into this and several of the other unsupported steps once #1 is done so we have the option of running in a real visual browser.