You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ui: false or headless: true, the browser viewport is only 1280x720px.
We set viewport: { width: 1920, height: 1080 }, while the document inside the iframe does have the expected dimensions, elements outside the browser viewport cannot be interacted with, breaking tests.
In our case, this broke a test with userEvent.dragAndDrop():
- waiting for getByText('Column 2')
- locator resolved to <div class="labelClassname_l13ks0oh">Column 2</div> - attempting move and up action
- waiting for element to be visible and stable
- element is visible and stable
- scrolling into view if needed
- done scrolling
- element is outside of the viewport
- retrying move and up action, attempt #1
- waiting for element to be visible and stable
- element is visible and stable
- scrolling into view if needed
- done scrolling
- element is outside of the viewport
- retrying move and up action, attempt #2
- waiting 20ms
- waiting for element to be visible and stable
- element is visible and stable
- scrolling into view if needed
- done scrolling
- element is outside of the viewport
Screenshots are still at the iframe's viewport dimensions though.
We had to resort to adding a custom command, and calling it in a beforeAll:
Describe the bug
When
ui: false
orheadless: true
, the browser viewport is only 1280x720px.We set
viewport: { width: 1920, height: 1080 }
, while the document inside the iframe does have the expected dimensions, elements outside the browser viewport cannot be interacted with, breaking tests.In our case, this broke a test with
userEvent.dragAndDrop()
:Screenshots are still at the iframe's viewport dimensions though.
We had to resort to adding a custom command, and calling it in a
beforeAll
:Reproduction
or
It's now impossible to scroll to or interact with elements beyond the browser viewport, the iframe is effectively cropped.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: