zinserjan / wdio-screenshot

A WebdriverIO plugin. Additional commands for taking screenshots with WebdriverIO.
MIT License
109 stars 43 forks source link

VR of RTL Popup Element results in Incorrect Offsets #94

Open emilyrohrbough opened 5 years ago

emilyrohrbough commented 5 years ago

Bug Report

Description

When taking a screenshot of a hookshot/pop-up element with dir='rtl', using a specific selector results in the following screenshot: Screen Shot 2019-05-03 at 1 21 25 PM

However, fullscreen is correct: Screen Shot 2019-05-03 at 1 21 30 PM

I think this is an issue with the wdio-screenshot's virtual scroll / element reposition for cropped screenshots. I've seen this behavior on IE popups recently as well.

Steps to Reproduce

  1. Run terra-hookshot's hookshot-spec.js test. Specifically this test
  2. Add the following assertions here
Terra.should.matchScreenshot('fullscreen', { selector: '#root' });
Terra.should.matchScreenshot('use_element', { selector: '#ContentOffset-bounds' });
  1. See difference in the hook shot content position in the screenshots.

Environment

Linked Issue: https://github.com/cerner/terra-toolkit/issues/278