-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
base: master
Are you sure you want to change the base?
Conversation
2004c9e
to
56957c0
Compare
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("<=") |
?
@@ -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(">=") |
?
@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.72% -0.01%
Complexity 7177 7177
============================================
Files 993 993
Lines 20823 20827 +4
Branches 1365 1365
============================================
+ Hits 20351 20354 +3
- Misses 362 363 +1
Partials 110 110 ☔ View full report in Codecov by Sentry. |
No description provided.