-
Notifications
You must be signed in to change notification settings - Fork 165
[1LP][RFR] New Test: Testing network manager's all security groups #9799
Conversation
ef0aad3
to
1d65cee
Compare
view.toolbar.view_selector.select('List View') | ||
for item_count in [10, 20, 50]: | ||
view.paginator.set_items_per_page(item_count) | ||
assert view.paginator.items_per_page == len(view.entities.get_all()) |
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.
Are you sure this will be true even when there is less number of entities as compared to the items set per page?
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.
yeah. I agree that's why I did not opt for large numbers like 1000.
But I am not sure how can we get to know entities will be less in exist.
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.
You could do assert len(view.entities.get_all()) <= view.paginator.items_per_page
.
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.
LGTM, just one question.
@@ -85,6 +88,27 @@ def is_displayed(self): | |||
including_entities = View.include(VMEntities, use_parent=True) | |||
|
|||
|
|||
class NetworkManagerDetailsView(NetworkProviderDetailsView): |
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.
Why are these views defined here, and not in cfme.networks.views
? They're network manager specific views.
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 going to block merge, @ganeshhubale please consider a followup PR to move the classes.
pass | ||
view = navigate_to(provider, "NetworkSecurityGroup") | ||
view.toolbar.view_selector.select('List View') | ||
for item_count in [10, 20, 50]: |
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.
If there are only 9 security groups, then the tests of 20/50 are fairly useless. Consider covering this BZ with an assertion in the context of a more in-depth test covering the Security Group page behavior.
…anageIQ#9799) * New Test: - Testing network manager's all security grups * Updated assertion
Purpose or Intent
PRT Run
{{ pytest: cfme/tests/cloud_infra_common/test_relationships.py -k 'test_change_network_security_groups_per_page_items' --use-template-cache -qsvv --use-provider azure }}