Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't allow negative swipe duration #2073

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Conversation

axelniklasson
Copy link
Contributor

@axelniklasson axelniklasson commented Oct 2, 2024

No description provided.

Copy link

github-actions bot commented Oct 2, 2024

Make sure to run ./maestro-ios-xctest-runner/build-maestro-ios-runner.sh with every swift change

element:
id: "maestro"
direction: DOWN
speed: 110
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting speed > 100 yields a negative duration so this is intended

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, might be some change that we have setting on duration for this maestro release.

I believe this one:

https://github.com/mobile-dev-inc/maestro/pull/1997/files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that is suspicious but I couldn't figure out how this would yield a negative duration without setting the speed in a flow.

@@ -3135,6 +3135,42 @@ class IntegrationTest {
)
}

@Test
fun `Case 118 - Scroll until view is visible - no negative values allowed`() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@axelniklasson axelniklasson merged commit 7efc075 into main Oct 3, 2024
9 checks passed
@axelniklasson axelniklasson deleted the no-negative-duration branch October 3, 2024 08:28
rasyid7 pushed a commit to rasyid7/maestro that referenced this pull request Dec 9, 2024
* fix: don't allow negative swipe duration

* update ios driver
rasyid7 pushed a commit to rasyid7/maestro that referenced this pull request Dec 9, 2024
* fix: don't allow negative swipe duration

* update ios driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants