-
Notifications
You must be signed in to change notification settings - Fork 116
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
Vertical menu search test #13421
Vertical menu search test #13421
Conversation
trigger: test-robottelo |
2 similar comments
trigger: test-robottelo |
trigger: test-robottelo |
trigger: test-robottelo |
1 similar comment
trigger: test-robottelo |
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.
Overally good but some comments left
@pnovotny Gentle ping |
New test for vertical navigation menu search functionality.
87aa6bc
to
04edbe1
Compare
trigger: test-robottelo |
trigger: test-robottelo |
@pnovotny can we get this merge soon? it's open for a while now |
I'm working on an airgun PR that fixes the PRT failure, because of funky behavior of the search input widget. |
trigger: test-robottelo |
PRT Result
|
), f'Search string {search_string} does not match result {result}!' | ||
|
||
|
||
def menu_search_should_not_find(search_func: callable, values: list[str]): |
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.
not a blocker but I'm curious if running the above function with not
in front of it would achieve the same result?
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.
I'd agree, there's probably a way to do this without a separate helper. Doesn't really affect the test overall though, more of a style difference.
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.
I get that the first three lines of the two functions are pretty similar, but merging both functions together to one and adding some "bool" argument, i.e., expect_to_find=True/False, would lead to more if..else branching and thus to less readability, IMO. Esp. comparing to how many lines of code we save by that.
Using not menu_search_should_find()
here won't help, because menu_search_should_find()
doesn't return bool, but does asserts instead - so a test failure is easily identifiable in the results.
Doing something like this
with pytest.raises(AssertionError):
menu_search_should_find()
would solve it, but then there is a case that AssertionError is thrown by the second assert (line 31) and that would be wrong.
New test for vertical navigation menu search functionality. (cherry picked from commit 8f6ce39)
trigger: test-robottelo |
New test for vertical navigation menu search functionality.
New module and test case for vertical menu search functionality.
TC:
test_positive_vertical_navigation_search_end_to_end
Requires: SatelliteQE/airgun#1076