Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] New Test: Testing network manager's all security groups #9799

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

ganeshhubale
Copy link
Member

Purpose or Intent

  • Testing network manager's all security groups by navigation from provider's details page to

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 }}

@ganeshhubale ganeshhubale added the test-automation To be applied on PR's which are automating existing manual cases label Dec 23, 2019
@dajoRH dajoRH added needs-lint and removed lint-ok labels Jan 9, 2020
   - Testing network manager's all security grups
@ganeshhubale ganeshhubale changed the title [WIP] New Test: Testing network manager's all security groups [WIPTEST] New Test: Testing network manager's all security groups Jan 9, 2020
@ganeshhubale ganeshhubale changed the title [WIPTEST] New Test: Testing network manager's all security groups [RFR] New Test: Testing network manager's all security groups Jan 10, 2020
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())
Copy link
Contributor

@valaparthvi valaparthvi Jan 10, 2020

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@valaparthvi valaparthvi left a 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.

@valaparthvi valaparthvi changed the title [RFR] New Test: Testing network manager's all security groups [1LP][RFR] New Test: Testing network manager's all security groups Jan 13, 2020
@@ -85,6 +88,27 @@ def is_displayed(self):
including_entities = View.include(VMEntities, use_parent=True)


class NetworkManagerDetailsView(NetworkProviderDetailsView):
Copy link
Member

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.

Copy link
Member

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]:
Copy link
Member

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.

@mshriver mshriver merged commit cc570ed into ManageIQ:master Jan 14, 2020
spusateri pushed a commit to spusateri/integration_tests that referenced this pull request Jan 27, 2020
…anageIQ#9799)

* New Test:
   - Testing network manager's all security grups

* Updated assertion
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement lint-ok test-automation To be applied on PR's which are automating existing manual cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants