Fix ScrollIntoView - DeltaX and DeltaY should be rounded#10091
Merged
christian-bromann merged 1 commit intowebdriverio:mainfrom Apr 5, 2023
Merged
Fix ScrollIntoView - DeltaX and DeltaY should be rounded#10091christian-bromann merged 1 commit intowebdriverio:mainfrom
christian-bromann merged 1 commit intowebdriverio:mainfrom
Conversation
|
|
Member
christian-bromann
left a comment
There was a problem hiding this comment.
Thanks for coming up with a PR, could you add a unit test to packages/webdriverio/tests/commands/element/scrollIntoView.test.ts to ensure we don't run into any regression?
OBe95
reviewed
Mar 31, 2023
|
|
||
| try { | ||
| return await browser.action('wheel') | ||
| .scroll({ duration: 200, deltaX, deltaY }) |
Contributor
There was a problem hiding this comment.
I would've round it here
Suggested change
| .scroll({ duration: 200, deltaX, deltaY }) | |
| .scroll({ duration: 200, deltaX: Math.round(deltaX), deltaY: Math.round(deltaY) }) |
8 tasks
christian-bromann
approved these changes
Apr 5, 2023
Member
christian-bromann
left a comment
There was a problem hiding this comment.
I want to include this into the next release so I will go ahead and merge this. Thanks @niklasschaeffer for the fix 👍 and congrats on your first contribution to WebdriverIO 🎉
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
deltaX and deltaY should be rounded values
Types of changes
Checklist
I have read the CONTRIBUTING doc
I have added tests that prove my fix is effective or that my feature works
Ran Tests locally. They were fine.
Further comments
Reviewers: @webdriverio/project-committers