diff --git a/cfme/services/catalogs/catalog_items/__init__.py b/cfme/services/catalogs/catalog_items/__init__.py index 4bb9d87864..9a8c62bb15 100644 --- a/cfme/services/catalogs/catalog_items/__init__.py +++ b/cfme/services/catalogs/catalog_items/__init__.py @@ -35,6 +35,7 @@ from widgetastic_manageiq import EntryPoint from widgetastic_manageiq import FileInput from widgetastic_manageiq import FonticonPicker +from widgetastic_manageiq import InputButton from widgetastic_manageiq import ManageIQTree from widgetastic_manageiq import SummaryForm from widgetastic_manageiq import SummaryFormItem @@ -151,7 +152,9 @@ def is_displayed(self): class DetailsEntitiesCatalogItemView(View): - custom_image = FileInput("upload_image") + upload_image = FileInput(id="upload_image") + upload_button = InputButton("commit") + remove = Button(title="Remove this Custom Image") smart_management = SummaryTable("Smart Management") diff --git a/cfme/tests/services/test_catalog_item.py b/cfme/tests/services/test_catalog_item.py index ad5d188732..c942719c58 100644 --- a/cfme/tests/services/test_catalog_item.py +++ b/cfme/tests/services/test_catalog_item.py @@ -13,6 +13,8 @@ from cfme.services.service_catalogs import ServiceCatalogs from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.blockers import BZ +from cfme.utils.conf import cfme_data +from cfme.utils.ftp import FTPClientWrapper from cfme.utils.log import logger from cfme.utils.log_validator import LogValidator from cfme.utils.update import update @@ -624,3 +626,36 @@ def test_add_bundle_in_bundle(appliance, catalog_bundle): options = view.resources.select_resource.all_options assert catalog_bundle.name not in [o.text for o in options] view.cancel_button.click() + + +@pytest.mark.meta(automates=[1487056]) +def test_upload_delete_custom_image_on_bundle(catalog_bundle): + """ + Bugzilla: + 1487056 + Polarion: + assignee: nansari + casecomponent: Services + initialEstimate: 1/8h + testSteps: + 1. Create a catalog item + 2. Create a catalog bundle + 3. Upload a custom image to bundle + 4. remove the image + expectedResults: + 1. + 2. + 3. + 4. Upload and Remove image should work + """ + image = 'logo.png' + fs = FTPClientWrapper(cfme_data.ftpserver.entities.others) + file_path = fs.download(image) + + view = navigate_to(catalog_bundle, 'Details') + view.entities.upload_image.fill(file_path) + view.entities.upload_button.click() + view.flash.assert_message(f'Custom Image file "{image}" successfully uploaded') + + view.entities.remove.click() + view.flash.assert_message('Custom Image successfully removed') diff --git a/cfme/tests/services/test_service_catalog_dialog_manual.py b/cfme/tests/services/test_service_catalog_dialog_manual.py index 9a2f7fa601..93c2b0a57c 100644 --- a/cfme/tests/services/test_service_catalog_dialog_manual.py +++ b/cfme/tests/services/test_service_catalog_dialog_manual.py @@ -25,36 +25,6 @@ def test_changing_action_order_in_catalog_bundle_should_not_removes_resource(): pass -@pytest.mark.manual -@pytest.mark.tier(2) -def test_custom_image_on_item_bundle_crud(): - """ - Polarion: - assignee: nansari - casecomponent: Services - testtype: functional - initialEstimate: 1/8h - startsin: 5.5 - tags: service - testSteps: - 1. Create a catalog item - 2. Upload custom image - 3. remove custom image - 4. Create a catalog bundle - 5. Upload a custom image - 6. Change custom image - expectedResults: - 1. - 2. No error seen - 3. - 4. - 5. No error seen - Bugzilla: - 1487056 - """ - pass - - @pytest.mark.manual @pytest.mark.tier(3) def test_request_filter_on_request_page():