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

[1LP][RFR] Adding service dialog multi drop test #9998

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfme/automate/dialogs/dialog_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class options(WaitTab): # noqa
field_past_dates = DialogBootstrapSwitch(label='Show Past Dates')
field_category = Select(
locator='.//select[../../../../label[normalize-space(text())="Category"]]')

multi_select = DialogBootstrapSwitch(label='Multiselect')
validation_switch = DialogBootstrapSwitch(label='Validation')
validation = Input(name='validator_rule')
visible = DialogBootstrapSwitch(label='Visible')
Expand Down
37 changes: 37 additions & 0 deletions cfme/tests/services/test_dialog_element_in_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import yaml

from cfme import test_requirements
from cfme.automate.dialogs.dialog_element import EditElementView
from cfme.automate.dialogs.service_dialogs import DetailsDialogView
from cfme.fixtures.automate import DatastoreImport
from cfme.infrastructure.provider.rhevm import RHEVMProvider
from cfme.markers.env_markers.provider import ONE
Expand Down Expand Up @@ -1136,3 +1138,38 @@ def test_dialog_default_value_selection(appliance, custom_categories, import_dat
view.fields("network").read() == network and
view.fields("number_disk").read() == additional_disks
)


@pytest.mark.meta(automates=[1559030])
@pytest.mark.customer_scenario
Copy link
Member

Choose a reason for hiding this comment

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

remove tier marker

@pytest.mark.parametrize(
"import_data", [DatastoreImport("bz_1558926.zip", "bz_1558926", None)], ids=["domain"],)
@pytest.mark.parametrize("file_name", ["bz_1559030.yml"], ids=["dialog"])
def test_save_dynamic_multi_drop_down_dialog(appliance, import_datastore, import_dialog,
import_data):
"""
Bugzilla:
1559030
Polarion:
assignee: nansari
casecomponent: Services
testtype: functional
initialEstimate: 1/4h
startsin: 5.10
"""
sd, ele_label = import_dialog
navigate_to(sd, "Edit")

# update dialog element
view = appliance.browser.create_view(EditElementView)
view.element.edit_element(ele_label)
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this navigation(navigate_to(sd, "Edit")) helps to reach at this page - EditElementView?

Copy link
Contributor Author

@niyazRedhat niyazRedhat Mar 19, 2020

Choose a reason for hiding this comment

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

No, after reaching to edit view page. we navigate to EditElement page to edit the element . , I think we have to navigate by EditElementView here

view.options.click()

# enable multi select button
view.options.multi_select.fill("Yes")
view.ele_save_button.click()
view.save_button.click()

# no error should be displayed
view = sd.create_view(DetailsDialogView, wait="60s")
view.flash.assert_success_message(f'{sd.label} was saved')
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: you can add wait in create_view(DetailsDialogView). No need of view.wait_displayed().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is some issue with wait . view.wait_displayed() would be nice here.

Copy link
Member

Choose a reason for hiding this comment

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

can you please point that issue here? Is GH issue created for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@valaparthvi any issue you know related to wait?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think there is any problem with create_view's wait. That problem was with FlashMessages widget. I think the widget stopped supporting wait argument.

Copy link
Member

Choose a reason for hiding this comment

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

17 changes: 0 additions & 17 deletions cfme/tests/services/test_service_catalog_dialog_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,23 +403,6 @@ def test_in_dynamic_dropdown_list_the_default_value_should_not_contain_all_the_v
pass


@pytest.mark.manual
@pytest.mark.tier(2)
def test_saving_service_dialog_with_multi_select_drop_down_populated_by_expression_method():
"""
Polarion:
assignee: nansari
casecomponent: Services
testtype: functional
initialEstimate: 1/4h
startsin: 5.9
tags: service
Bugzilla:
1559030
"""
pass


@pytest.mark.manual
@pytest.mark.tier(3)
def test_cui_should_check_dialog_field_associations():
Expand Down