-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add cropOn
screenshots capability
#2086
base: main
Are you sure you want to change the base?
feat: add cropOn
screenshots capability
#2086
Conversation
Hey @TheKohan -- About the tests, you can add a E2E test in the "e2e" module. About this feature, great delivery! |
Is there a reason to limit it to id than reuse the existing complex element selector logic that exists for other commands? |
To be completely honest i didn't think about it, but i think you're right. Let me try to reimplement this part. |
cropOn
screenshots capability
@Fishbowler - adjusted API acording to your suggestions, it's indeed way better this way. Thanks for the hint ! |
Added test cases. |
f436fe0
to
59ee970
Compare
@amanjeetsingh150 - can you review this PR ? |
Proposed changes
This PR extends current capabilities of
takeScreenshot
command withcropOn
prop which is of anElementSelector
type.Motivation
Visual regression testing is something that has been on the horizon for some time #1222. This PR is aiming to fill the gaps and prepare the ground for further development in this area (will fit #2078 great). Component level screenshots are something that will greatly decrease screenshot size and make component-level tests possible.
Example usage
test-screenshot.yml
test-component-screenshot.yml
Testing