-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add 'at most' and 'at least' aliases for comparison rules #5726
Add 'at most' and 'at least' aliases for comparison rules #5726
Conversation
56957c0
to
ed69dc5
Compare
@@ -40,6 +40,14 @@ public <T extends Comparable<T>> Matcher<T> getComparisonRule(T variable) | |||
return Matchers.lessThanOrEqualTo(variable); | |||
} | |||
}, | |||
AT_MOST("at most") |
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.
AT_MOST("at most") | |
AT_MOST("<=") |
?
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.
this was done to return LESS_THAN_OR_EQUAL_TO value in fromString
method for '<=' sign regardless of the order of declaration of elements in enum
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.
ok, then just add null
alias, and add processing of null
-s
@@ -56,6 +64,14 @@ public <T extends Comparable<T>> Matcher<T> getComparisonRule(T variable) | |||
return Matchers.greaterThanOrEqualTo(variable); | |||
} | |||
}, | |||
AT_LEAST("at least") |
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.
AT_LEAST("at least") | |
AT_LEAST(">=") |
?
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.
@Override | ||
public <T extends Comparable<T>> Matcher<T> getComparisonRule(T variable) | ||
{ | ||
return Matchers.lessThanOrEqualTo(variable); |
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.
return Matchers.lessThanOrEqualTo(variable); | |
return ComparisonRule.LESS_THAN_OR_EQUAL_TO.getComparisonRule(variable); |
@Override | ||
public <T extends Comparable<T>> Matcher<T> getComparisonRule(T variable) | ||
{ | ||
return Matchers.greaterThanOrEqualTo(variable); |
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.
return Matchers.greaterThanOrEqualTo(variable); | |
return ComparisonRule.GREATER_THAN_OR_EQUAL_TO.getComparisonRule(variable); |
Then `${details.networkState}` is at least `1` | ||
Then `${details.src}` matches `.+/video/countdown\.mp4` | ||
When I play video in video player located by `<videoLocator>` | ||
Then element located by `<videoLocator>` exists for `PT1S` duration | ||
When I save info from video player located by `<videoLocator>` to SCENARIO variable `details` | ||
Then `${details.currentTime}` is > `${rewindTime}` | ||
Then `${details.duration}` is > `8` | ||
Then `${details.networkState}` is >= `1` | ||
Then `${details.networkState}` is at least `1` |
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.
this doesn't have much sense logically, it's better to change some tests from DynamicVariablesTests.story
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5726 +/- ##
=========================================
Coverage 97.73% 97.73%
- Complexity 7177 7179 +2
=========================================
Files 993 993
Lines 20823 20825 +2
Branches 1365 1366 +1
=========================================
+ Hits 20351 20353 +2
Misses 362 362
Partials 110 110 ☔ View full report in Codecov by Sentry. |
ed69dc5
to
f198d8b
Compare
6262469
to
435c88c
Compare
No description provided.