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

Commit de3323e

Browse files
authored
Merge pull request #10104 from niyazRedhat/load-value-init
[1LP][RFR] Automating dynamic dialog load value on init
2 parents cd8eec0 + f127cdd commit de3323e

1 file changed

Lines changed: 28 additions & 59 deletions

File tree

cfme/tests/services/test_dynamicdd_dialogelement.py

Lines changed: 28 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
from cfme.fixtures.automate import DatastoreImport
88
from cfme.services.service_catalogs import ServiceCatalogs
99
from cfme.tests.automate.custom_button import DropdownDialogView
10+
from cfme.utils.appliance import ViaSSUI
11+
from cfme.utils.appliance import ViaUI
12+
from cfme.utils.appliance.implementations.ssui import navigate_to as ssui_nav
1013
from cfme.utils.appliance.implementations.ui import navigate_to
1114
from cfme.utils.log_validator import LogValidator
1215
from cfme.utils.wait import wait_for
@@ -227,53 +230,40 @@ def test_dropdown_dialog_descending_values(appliance, generic_catalog_item_with_
227230
assert options_list == value
228231

229232

230-
@pytest.mark.manual
233+
@pytest.mark.customer_scenario
234+
@pytest.mark.meta(automates=[1322594, 1581996])
231235
@pytest.mark.tier(2)
232-
def test_dynamic_dropdowns_should_show_value_only_once():
233-
"""
234-
Polarion:
235-
assignee: nansari
236-
casecomponent: Services
237-
testtype: functional
238-
initialEstimate: 1/4h
239-
startsin: 5.9
240-
tags: service
241-
"""
242-
pass
243-
244-
245-
@pytest.mark.manual
246-
@pytest.mark.tier(3)
247-
def test_ssui_dd_values_are_not_loaded_in_dropdown_unless_refresh_button_is_pressed():
236+
@pytest.mark.parametrize("import_data", [DatastoreImport("bz_1322594.zip", "bz_1322594", None)],
237+
ids=["datastore"])
238+
@pytest.mark.parametrize("file_name", ["bz_1322594.yml"], ids=["dynamic_dialog"])
239+
@pytest.mark.parametrize('context', [ViaUI, ViaSSUI])
240+
def test_dynamic_dropdown_load_value_on_init(appliance, import_datastore, import_data,
241+
generic_catalog_item_with_imported_dialog, context):
248242
"""
249-
Polarion:
250-
assignee: nansari
251-
casecomponent: Services
252-
testtype: functional
253-
initialEstimate: 1/8h
254-
startsin: 5.8
255-
tags: service
256243
Bugzilla:
257244
1322594
258-
"""
259-
pass
260-
245+
1581996
261246
262-
@pytest.mark.manual
263-
@pytest.mark.tier(3)
264-
def test_in_dynamic_multi_select_dialog_elements_the_first_element_shouldnt_be_selected():
265-
"""
266247
Polarion:
267248
assignee: nansari
249+
startsin: 5.10
268250
casecomponent: Services
269-
initialEstimate: 1/6h
270-
testtype: functional
271-
startsin: 5.9
272-
tags: service
273-
Bugzilla:
274-
1322594
251+
initialEstimate: 1/16h
275252
"""
276-
pass
253+
catalog_item, _, _ = generic_catalog_item_with_imported_dialog
254+
255+
service_catalogs = ServiceCatalogs(appliance, catalog_item.catalog, catalog_item.name)
256+
with appliance.context.use(context):
257+
if context == ViaSSUI:
258+
view = ssui_nav(service_catalogs, "Details")
259+
else:
260+
view = navigate_to(service_catalogs, "Order")
261+
262+
# Dynamic drop_downs should load the values on init
263+
wait_for(
264+
lambda: view.fields("dropdown_list_1").read() == 'fifty' and
265+
view.fields("dropdown_list_2_1_1").read() == '10', timeout=60
266+
)
277267

278268

279269
@pytest.mark.customer_scenario
@@ -407,27 +397,6 @@ def test_automation_executed_on_field_refresh_are_called_twice_in_self_service_d
407397
pass
408398

409399

410-
@pytest.mark.manual
411-
@pytest.mark.tier(3)
412-
def test_dynamic_dropdown_values_should_load_correctly():
413-
"""
414-
Polarion:
415-
assignee: nansari
416-
casecomponent: Services
417-
testtype: functional
418-
initialEstimate: 1/4h
419-
startsin: 5.9
420-
tags: service
421-
testSteps:
422-
1. Import the dialog and domain attached
423-
2. Select Contract A . Contract B gets selected
424-
3. In Location no values are loaded
425-
Bugzilla:
426-
1581996
427-
"""
428-
pass
429-
430-
431400
@pytest.mark.customer_scenario
432401
@pytest.mark.meta(automates=[1580535, 1694737])
433402
@pytest.mark.tier(2)

0 commit comments

Comments
 (0)