|
7 | 7 | from cfme.fixtures.automate import DatastoreImport |
8 | 8 | from cfme.services.service_catalogs import ServiceCatalogs |
9 | 9 | 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 |
10 | 13 | from cfme.utils.appliance.implementations.ui import navigate_to |
11 | 14 | from cfme.utils.log_validator import LogValidator |
12 | 15 | from cfme.utils.wait import wait_for |
@@ -227,53 +230,40 @@ def test_dropdown_dialog_descending_values(appliance, generic_catalog_item_with_ |
227 | 230 | assert options_list == value |
228 | 231 |
|
229 | 232 |
|
230 | | -@pytest.mark.manual |
| 233 | +@pytest.mark.customer_scenario |
| 234 | +@pytest.mark.meta(automates=[1322594, 1581996]) |
231 | 235 | @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): |
248 | 242 | """ |
249 | | - Polarion: |
250 | | - assignee: nansari |
251 | | - casecomponent: Services |
252 | | - testtype: functional |
253 | | - initialEstimate: 1/8h |
254 | | - startsin: 5.8 |
255 | | - tags: service |
256 | 243 | Bugzilla: |
257 | 244 | 1322594 |
258 | | - """ |
259 | | - pass |
260 | | - |
| 245 | + 1581996 |
261 | 246 |
|
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 | | - """ |
266 | 247 | Polarion: |
267 | 248 | assignee: nansari |
| 249 | + startsin: 5.10 |
268 | 250 | casecomponent: Services |
269 | | - initialEstimate: 1/6h |
270 | | - testtype: functional |
271 | | - startsin: 5.9 |
272 | | - tags: service |
273 | | - Bugzilla: |
274 | | - 1322594 |
| 251 | + initialEstimate: 1/16h |
275 | 252 | """ |
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 | + ) |
277 | 267 |
|
278 | 268 |
|
279 | 269 | @pytest.mark.customer_scenario |
@@ -407,27 +397,6 @@ def test_automation_executed_on_field_refresh_are_called_twice_in_self_service_d |
407 | 397 | pass |
408 | 398 |
|
409 | 399 |
|
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 | | - |
431 | 400 | @pytest.mark.customer_scenario |
432 | 401 | @pytest.mark.meta(automates=[1580535, 1694737]) |
433 | 402 | @pytest.mark.tier(2) |
|
0 commit comments