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

[1LP][RFR] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles #9266

Merged
merged 6 commits into from
Jan 14, 2020

Conversation

valaparthvi
Copy link
Contributor

@valaparthvi valaparthvi commented Aug 29, 2019

Purpose or Intent

  • Adding tests test_infrastructure_provider_left_panel_titles
  • Updating tests test_run_host_analysis which uses host details sidebar.
  • Enhancement Add sidebar accordions to the following pages
    1. Infrastructure > Providers
    2. Infrastructure > Clusters
    3. Infrastructure > Hosts
    4. Infrastructure > Resource Pools

Note: Dependent on : RedHatQE/widgetastic.patternfly#114

PRT Run

{{ pytest : cfme/tests/webui/test_general_ui.py::test_infrastructure_provider_left_panel_titles cfme/tests/infrastructure/test_host_analysis.py::test_run_host_analysis -vvv }}

@valaparthvi valaparthvi changed the title [WIP] Add sidebar accordion to Compute Infrastructure pages [WIP] Add sidebar accordion to Compute Infrastructure pages and Automate test: test_infrastructure_provider_left_panel_titles Sep 4, 2019
@valaparthvi valaparthvi changed the title [WIP] Add sidebar accordion to Compute Infrastructure pages and Automate test: test_infrastructure_provider_left_panel_titles [WIP] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Sep 4, 2019
@valaparthvi valaparthvi changed the title [WIP] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Sep 4, 2019
@dajoRH dajoRH added WIP-testing and removed WIP labels Sep 4, 2019
@valaparthvi valaparthvi changed the title [WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [WIP] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Sep 5, 2019
@dajoRH dajoRH added WIP and removed WIP-testing labels Sep 5, 2019
@valaparthvi valaparthvi changed the title [WIP] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Sep 14, 2019
@dajoRH dajoRH added WIP-testing and removed WIP labels Sep 14, 2019
@valaparthvi valaparthvi changed the title [WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [RFR Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Sep 16, 2019
@valaparthvi valaparthvi changed the title [RFR Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Sep 16, 2019
@valaparthvi valaparthvi force-pushed the fix_manageiqtree branch 2 times, most recently from ebbd7b5 to f402e2f Compare October 17, 2019 10:26
@dajoRH dajoRH changed the title [WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [WIP] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Oct 25, 2019
@valaparthvi
Copy link
Contributor Author

These tests passed locally, but PRT keeps resulting into Invalid state for some reason :/
Just a heads up, PRT will fail for 511 because of test_run_host_analysis but that is not related to the changes made by this PR.

@jawatts jawatts changed the title [1LP][WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [1LP][RFR] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Dec 19, 2019
@jawatts
Copy link
Contributor

jawatts commented Dec 19, 2019

@valaparthvi looks like test_general_ui failed as well in 5.11

@valaparthvi
Copy link
Contributor Author

valaparthvi commented Dec 19, 2019

@jawatts So I figured what went wrong, I guess I'll have to open another PR to wt.patternfly 😩
Here, there is no parent, so it selects any element that matches the xpath without taking into account the scope. There is an extra element that matches the xpath on 511, which is causing this failure. I think defining the parent here should fix this.

Edit:
wt.patternfly PR: RedHatQE/widgetastic.patternfly#117

test_view = provider.create_view(ALL_OPTIONS[option][panel], wait="60s")
soft_assert(test_view.is_displayed, f"{test_view} not displayed.")
else:
logger.info(f"'{panel}' was not tested, it did not enable.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a pytest.skip or pytest.fail - the item was expected to enable why wouldn't that be a failure?

Copy link
Contributor Author

@valaparthvi valaparthvi Dec 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few items that get enabled once the provider receives data, but there are items such as Timelines that take some 15-20 minutes to enable itself, so I decided to just log it, I don't want to fail/skip the test in this case. Is there a way to quickly enable Timelines?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not aware of a way to quickly enable timelines in this case.

I still am not comfortable with this result for the test though. There will be no indication in the results or artifactor report that this occurred - you would have to inspect the cfme.log file on every test execution to check for this message and to know whether or not timelines was actually tested.

A pytest xfail may be your best option here - that its more or less and expected failure state. We need some indication in results that there was missing coverage for this test case.

That or test timelines separately, putting more investigation into how to enable the option quickly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So John helped me trigger Timelines, activities like creating/deleting/reconfiguring VMs create an event and triggers Timelines. So I did that, I create VM as a part of setup.

Copy link
Member

@mshriver mshriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great - just 1 comment about the silent test failure with a log message.

I'm also going to merge/release the wt.pf PR that adds parents to the partial match element lookups, which is causing the PRT failures. You should update the requirements files to the newest wt.pf version.

@mshriver mshriver assigned mshriver and unassigned jawatts Dec 19, 2019
@mshriver mshriver changed the title [1LP][RFR] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [1LP][WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Dec 19, 2019
@valaparthvi valaparthvi changed the title [1LP][WIPTEST] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles [1LP][RFR] Add sidebar accordion to Compute Infrastructure pages AND automate test: test_infrastructure_provider_left_panel_titles Dec 21, 2019
@valaparthvi
Copy link
Contributor Author

Moving to RFR. 511 PRT failures are unrelated to these changes.

)
if not accordion.tree.is_disabled(partial_match(panel)):
accordion.tree.select(partial_match(panel))
test_view = provider.create_view(ALL_OPTIONS[option][panel], wait="60s")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you passed wait parameter, this will raise an exception before your soft assert if the view isn't displayed.

Copy link
Member

@mshriver mshriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failure modes need to be revised.

@dajoRH
Copy link
Contributor

dajoRH commented Jan 14, 2020

I detected some fixture changes in commit 32cd546

The local fixture vm is used in the following files:

  • cfme/tests/webui/test_general_ui.py

Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃

@mshriver mshriver merged commit f556946 into ManageIQ:master Jan 14, 2020
spusateri pushed a commit to spusateri/integration_tests that referenced this pull request Jan 27, 2020
…automate test: test_infrastructure_provider_left_panel_titles (ManageIQ#9266)

* Add sidebar accordion to provider detail and cluster details view

* Add sidebar for infra hosts

* Add sidebar for infra resource pools

* Requested changes

* Update wt.pf requirements

* Fix failing test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement lint-ok new-test-or-feature 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.

5 participants