def test_delete_dialog_before_parent_item(appliance, catalog_item):
    service_dialog = DialogCollection(appliance)
    dialog = service_dialog.instantiate(label=catalog_item.dialog.label)
    error_message = ('Dialog \"{}\": Error during delete: Dialog cannot be'
        ' deleted because it is connected to other components.').format(catalog_item.dialog.label)
    with error.expected(error_message):
        dialog.delete()
def test_delete_dialog_before_parent_item(appliance, catalog_item):
    service_dialog = DialogCollection(appliance)
    dialog = service_dialog.instantiate(label=catalog_item.dialog.label)
    error_message = ('Dialog \"{}\": Error during delete: Dialog cannot be'
        ' deleted because it is connected to other components.').format(catalog_item.dialog.label)
    with error.expected(error_message):
        dialog.delete()
def dialog(appliance, provider, template):
    template, dialog_name = template
    service_name = fauxfactory.gen_alphanumeric()
    element_data = dict(ele_label="ele_" + fauxfactory.gen_alphanumeric(),
                        ele_name="service_name",
                        ele_desc="my ele desc",
                        choose_type="Text Box",
                        default_text_box=service_name)
    dialog = DialogCollection(appliance)
    sd = dialog.instantiate(label=dialog_name)
    tab = sd.tabs.instantiate(tab_label="Basic Information")
    box = tab.boxes.instantiate(box_label="Options")
    element = box.elements.instantiate(element_data=element_data)
    element.add_another_element(element_data)
    yield template, sd, service_name
Exemplo n.º 4
0
def dialog(appliance, provider, template):
    template, dialog_name = template
    service_name = fauxfactory.gen_alphanumeric()
    element_data = dict(
        ele_label="ele_" + fauxfactory.gen_alphanumeric(),
        ele_name="service_name",
        ele_desc="my ele desc",
        choose_type="Text Box",
        default_text_box=service_name
    )
    dialog = DialogCollection(appliance)
    sd = dialog.instantiate(label=dialog_name)
    tab = sd.tabs.instantiate(tab_label="Basic Information")
    box = tab.boxes.instantiate(box_label="Options")
    element = box.elements.instantiate(element_data=element_data)
    element.add_another_element(element_data)
    yield template, sd, service_name