-
-
Notifications
You must be signed in to change notification settings - Fork 764
Mykola mokhnach's actions params: The addition to the #756 #760
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
Merged
TikhomirovSergey
merged 15 commits into
appium:master
from
TikhomirovSergey:mykola-mokhnach-actions_params
Nov 12, 2017
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
55039ab
Refactor setting of touch actions options
5fdf0e1
Add unit tests
95e4042
Fix checkstyle issues
c817ac4
Merge branch 'actions_params' of https://github.com/mykola-mokhnach/j…
TikhomirovSergey f525ae3
The addition to the #756:
TikhomirovSergey 42f4a96
The addition to the #756:
TikhomirovSergey cbd9f5d
The addition to the #756:
TikhomirovSergey 0b185e0
The addition to the #756. The final commit.
TikhomirovSergey c8185da
The addition to the #756. Code improvements:
TikhomirovSergey c892098
The addition to the #756. archetetural improvement:
TikhomirovSergey 483ba5a
The addition to the #756. Method renaming
TikhomirovSergey ee55d22
The addition to the #756. Bug fix
TikhomirovSergey 6ddbd2e
The addition to the #756. Archetectural improvement:
TikhomirovSergey 92ab4c6
The addition to the #756. Archetectural improvement.
TikhomirovSergey 52492ec
The addition to the #756. The fixing out of minor issues:
TikhomirovSergey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
6 changes: 0 additions & 6 deletions
6
src/test/java/io/appium/java_client/touch/IThrowingRunnable.java
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
import static io.appium.java_client.touch.WaitOptions.waitOptions; | ||
import static java.time.Duration.ofMillis; | ||
import static java.time.Duration.ofSeconds; | ||
import static junit.framework.TestCase.fail; | ||
import static org.hamcrest.CoreMatchers.everyItem; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.isIn; | ||
|
@@ -24,34 +25,28 @@ | |
public class TouchOptionsTests { | ||
private static final WebElement DUMMY_ELEMENT = new DummyElement(); | ||
|
||
@Test | ||
@Test(expected = IllegalArgumentException.class) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't know about such possibility %) |
||
public void invalidAbsolutePositionOptionsShouldFailOnBuild() throws Exception { | ||
final List<ActionOptions> invalidOptions = new ArrayList<>(); | ||
invalidOptions.add(new AbsoluteOffsetOption()); | ||
for (ActionOptions opts : invalidOptions) { | ||
assertThat(opts::build, failsWith(IllegalArgumentException.class)); | ||
} | ||
new AbsoluteOffsetOption().build(); | ||
fail("The exception throwing was expected"); | ||
} | ||
|
||
@Test | ||
@Test(expected = IllegalArgumentException.class) | ||
public void invalidRelativePositionOptionsShouldFailOnBuild() throws Exception { | ||
final List<ActionOptions> invalidOptions = new ArrayList<>(); | ||
invalidOptions.add(new RelativeOffsetOption()); | ||
for (ActionOptions opts : invalidOptions) { | ||
assertThat(opts::build, failsWith(IllegalArgumentException.class)); | ||
} | ||
new RelativeOffsetOption().build(); | ||
fail("The exception throwing was expected"); | ||
} | ||
|
||
@Test | ||
public void invalidOptionsArgumentsShouldFailOnAltering() throws Exception { | ||
final List<IThrowingRunnable<RuntimeException>> invalidOptions = new ArrayList<>(); | ||
final List<Runnable> invalidOptions = new ArrayList<>(); | ||
invalidOptions.add(() -> waitOptions(ofMillis(-1))); | ||
invalidOptions.add(() -> new RelativeOffsetOption().withRelativeOffset(null, 0, 0)); | ||
invalidOptions.add(() -> new WaitOptions().withDuration(null)); | ||
invalidOptions.add(() -> tapOptions().withTapsCount(-1)); | ||
invalidOptions.add(() -> longPressOptions().withDuration(null)); | ||
invalidOptions.add(() -> longPressOptions().withDuration(ofMillis(-1))); | ||
for (IThrowingRunnable<RuntimeException> item : invalidOptions) { | ||
for (Runnable item : invalidOptions) { | ||
assertThat(item, failsWith(RuntimeException.class)); | ||
} | ||
} | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also compilation error here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??? ок
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SrinivasanTarget
I can't reproduce it even after removal of the project from the disc and cloning it again.
Could you try again? If you are facing the same issue could you provide some text of the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SrinivasanTarget even Travis could compile the project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes travis wasn't able to catch it. Only IDE throws it on file level but still project builds fine.
no instance of type variable exists so that E conforms to capture of ? super....
is error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine in latest IDE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you use Eclipse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intellij IDEA 2017.1.5 throws this error but no errors in Intellij IDEA 2017.2