当前位置: 首页>>代码示例>>Python>>正文


Python service_dialogs.ServiceDialog类代码示例

本文整理汇总了Python中cfme.automate.service_dialogs.ServiceDialog的典型用法代码示例。如果您正苦于以下问题:Python ServiceDialog类的具体用法?Python ServiceDialog怎么用?Python ServiceDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ServiceDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: dialog

def dialog():
    dialog_name = "dialog_" + fauxfactory.gen_alphanumeric()

    element_data = dict(
        ele_label="ele_" + fauxfactory.gen_alphanumeric(),
        ele_name=fauxfactory.gen_alphanumeric(),
        ele_desc="my ele desc",
        choose_type="Text Box",
        default_text_box="default value"
    )

    service_dialog = ServiceDialog(label=dialog_name, description="my dialog",
                                   submit=True, cancel=True,
                                   tab_label="tab_" + fauxfactory.gen_alphanumeric(),
                                   tab_desc="my tab desc",
                                   box_label="box_" + fauxfactory.gen_alphanumeric(),
                                   box_desc="my box desc")
    service_dialog.create(element_data)
    flash.assert_success_message('Dialog "{}" was added'.format(dialog_name))
    yield service_dialog

    # fixture cleanup
    try:
        service_dialog.delete()
    except NoSuchElementException or TimeoutException:
        logger.warning('test_catalog_item: dialog yield fixture cleanup, dialog "{}" not '
                       'found'.format(dialog_name))
开发者ID:RonnyPfannschmidt,项目名称:cfme_tests,代码行数:27,代码来源:test_catalog_item.py

示例2: dialog

def dialog():
    dialog = "dialog_" + generate_random_string()
    service_dialog = ServiceDialog(label=dialog,
                  description="my dialog", submit=True, cancel=True)
    service_dialog.create()
    flash.assert_success_message('Dialog "%s" was added' % dialog)
    yield dialog
开发者ID:slouderm,项目名称:cfme_tests,代码行数:7,代码来源:test_catalog_item.py

示例3: test_reorder_unsaved_elements

def test_reorder_unsaved_elements():
    # Automate BZ - https://bugzilla.redhat.com/show_bug.cgi?id=1238721
    element_1_data = {
        'ele_label': "ele_" + fauxfactory.gen_alphanumeric(),
        'ele_name': fauxfactory.gen_alphanumeric(),
        'ele_desc': fauxfactory.gen_alphanumeric(),
        'choose_type': "Text Box",
        'default_text_box': "Default text"
    }
    element_2_data = {
        'ele_label': "ele_" + fauxfactory.gen_alphanumeric(),
        'ele_name': fauxfactory.gen_alphanumeric(),
        'ele_desc': fauxfactory.gen_alphanumeric(),
        'choose_type': "Check Box",
        'default_text_box': True,
        'field_required': True
    }
    dialog = ServiceDialog(label=fauxfactory.gen_alphanumeric(),
                           description="my dialog", submit=True, cancel=True,
                           tab_label="tab_" + fauxfactory.gen_alphanumeric(),
                           tab_desc="my tab desc",
                           box_label="box_" + fauxfactory.gen_alphanumeric(),
                           box_desc="my box desc")
    dialog.create(element_1_data)
    dialog.update_element(element_2_data, element_1_data)
开发者ID:FilipB,项目名称:cfme_tests,代码行数:25,代码来源:test_service_dialog.py

示例4: test_create_service_dialog

def test_create_service_dialog():
    dialog = ServiceDialog(label=rand.generate_random_string(),
                  description="my dialog", submit=True, cancel=True,
                  tab_label="tab_" + rand.generate_random_string(), tab_desc="my tab desc",
                  box_label="box_" + rand.generate_random_string(), box_desc="my box desc",
                  ele_label="ele_" + rand.generate_random_string(),
                  ele_name=rand.generate_random_string(),
                  ele_desc="my ele desc", choose_type="Text Box", default_text_box="default value")
    dialog.create()
开发者ID:slouderm,项目名称:cfme_tests,代码行数:9,代码来源:test_service_dialog.py

示例5: some_dialogs

def some_dialogs(request):
    to_delete = []
    request.addfinalizer(lambda: map(lambda obj: obj.delete(), to_delete))
    for i in range(15):
        desc = "test_paginator_{}".format(generate_random_string(16))
        dialog = ServiceDialog(label=desc, description=desc)
        dialog.create()
        to_delete.append(dialog)
    return to_delete
开发者ID:slouderm,项目名称:cfme_tests,代码行数:9,代码来源:test_customization_paginator.py

示例6: test_service_dialog_duplicate_name

def test_service_dialog_duplicate_name():
    dialog = ServiceDialog(label=rand.generate_random_string(),
                  description="my dialog", submit=True, cancel=True)
    dialog.create()
    error_msg = version.pick({
        version.LOWEST: "Dialog Label has already been taken",
        '5.3': "Label has already been taken"
    })
    with error.expected(error_msg):
        dialog.create()
开发者ID:slouderm,项目名称:cfme_tests,代码行数:10,代码来源:test_service_dialog.py

示例7: test_delete_dialog_before_parent_item

def test_delete_dialog_before_parent_item(catalog_item):
    service_dialog = ServiceDialog(label=catalog_item.dialog)
    service_dialog.delete()
    message = version.pick({'5.6': (("Dialog \"{}\": Error during delete: Dialog cannot be " +
                            "deleted because it is connected to other components.").
                            format(catalog_item.dialog)),
                            '5.5': (("Dialog \"{}\": Error during 'destroy': Dialog cannot be " +
                            "deleted because it is connected to other components.").
                            format(catalog_item.dialog))})
    flash.assert_message_match(message)
开发者ID:FilipB,项目名称:cfme_tests,代码行数:10,代码来源:test_generic_service_catalogs.py

示例8: dialog

def dialog():
    dialog = "dialog_" + generate_random_string()
    service_dialog = ServiceDialog(label=dialog, description="my dialog",
                     submit=True, cancel=True,
                     tab_label="tab_" + generate_random_string(), tab_desc="tab_desc",
                     box_label="box_" + generate_random_string(), box_desc="box_desc",
                     ele_label="ele_" + generate_random_string(),
                     ele_name="service_name",
                     ele_desc="ele_desc", choose_type="Text Box", default_text_box="default value")
    service_dialog.create()
    yield dialog
开发者ID:jkrocil,项目名称:cfme_tests,代码行数:11,代码来源:test_pxe_service_catalogs.py

示例9: dialog

def dialog():
    dialog = "dialog_" + fauxfactory.gen_alphanumeric()
    element_data = dict(
        ele_label="ele_" + fauxfactory.gen_alphanumeric(),
        ele_name=fauxfactory.gen_alphanumeric(),
        ele_desc="my ele desc",
        choose_type="Text Box",
        default_text_box="default value"
    )
    service_dialog = ServiceDialog(label=dialog, description="my dialog", submit=True, cancel=True,
                     tab_label="tab_" + fauxfactory.gen_alphanumeric(), tab_desc="my tab desc",
                     box_label="box_" + fauxfactory.gen_alphanumeric(), box_desc="my box desc")
    service_dialog.create(element_data)
    yield dialog
开发者ID:seandst,项目名称:cfme_tests,代码行数:14,代码来源:test_generic_service_catalogs.py

示例10: test_radiobutton_dialog_element

def test_radiobutton_dialog_element():
    element_data = {
        'ele_label': "ele_" + fauxfactory.gen_alphanumeric(),
        'ele_name': fauxfactory.gen_alphanumeric(),
        'ele_desc': fauxfactory.gen_alphanumeric(),
        'choose_type': "Radio Button"
    }
    dialog = ServiceDialog(label=fauxfactory.gen_alphanumeric(),
                           description="my dialog", submit=True, cancel=True,
                           tab_label="tab_" + fauxfactory.gen_alphanumeric(),
                           tab_desc="my tab desc",
                           box_label="box_" + fauxfactory.gen_alphanumeric(),
                           box_desc="my box desc")
    dialog.create(element_data)
开发者ID:FilipB,项目名称:cfme_tests,代码行数:14,代码来源:test_service_dialog.py

示例11: test_radiobutton_dialog_element

def test_radiobutton_dialog_element():
    element_data = {
        'ele_label': "ele_" + rand.generate_random_string(),
        'ele_name': rand.generate_random_string(),
        'ele_desc': rand.generate_random_string(),
        'choose_type': "Radio Button"
    }
    dialog = ServiceDialog(label=rand.generate_random_string(),
                           description="my dialog", submit=True, cancel=True,
                           tab_label="tab_" + rand.generate_random_string(),
                           tab_desc="my tab desc",
                           box_label="box_" + rand.generate_random_string(),
                           box_desc="my box desc")
    dialog.create(element_data)
开发者ID:petrblaho,项目名称:cfme_tests,代码行数:14,代码来源:test_service_dialog.py

示例12: some_dialogs

def some_dialogs(request):
    to_delete = []
    request.addfinalizer(lambda: map(lambda obj: obj.delete(), to_delete))
    for i in range(6):
        random_str = fauxfactory.gen_alphanumeric(16)
        element_data = dict(ele_label='ele_label_{}'.format(random_str),
                            ele_name='ele_name_{}'.format(random_str),
                            choose_type='Check Box')
        dialog = ServiceDialog(
            label='test_paginator_{}'.format(random_str),
            tab_label='tab_{}'.format(random_str),
            box_label='box_{}'.format(random_str))
        dialog.create(element_data)
        to_delete.append(dialog)
    return to_delete
开发者ID:FilipB,项目名称:cfme_tests,代码行数:15,代码来源:test_customization_paginator.py

示例13: dialog

def dialog():
    dialog = "dialog_" + generate_random_string()
    element_data = dict(
        ele_label="ele_" + rand.generate_random_string(),
        ele_name=rand.generate_random_string(),
        ele_desc="my ele desc", choose_type="Text Box",
        default_text_box="default value"
    )
    service_dialog = ServiceDialog(label=dialog, description="my dialog",
                     submit=True, cancel=True,
                     tab_label="tab_" + rand.generate_random_string(), tab_desc="my tab desc",
                     box_label="box_" + rand.generate_random_string(), box_desc="my box desc")
    service_dialog.create(element_data)
    flash.assert_success_message('Dialog "%s" was added' % dialog)
    yield dialog
开发者ID:petrblaho,项目名称:cfme_tests,代码行数:15,代码来源:test_vm_clone.py

示例14: test_textareabox_dialog_element

def test_textareabox_dialog_element():
    element_data = {
        'ele_label': "ele_" + rand.generate_random_string(),
        'ele_name': rand.generate_random_string(),
        'ele_desc': rand.generate_random_string(),
        'choose_type': "Text Area Box",
        'field_required': True
    }
    dialog = ServiceDialog(label=rand.generate_random_string(),
                           description="my dialog", submit=True, cancel=True,
                           tab_label="tab_" + rand.generate_random_string(),
                           tab_desc="my tab desc",
                           box_label="box_" + rand.generate_random_string(),
                           box_desc="my box desc")
    dialog.create(element_data)
开发者ID:petrblaho,项目名称:cfme_tests,代码行数:15,代码来源:test_service_dialog.py

示例15: test_create_service_dialog

def test_create_service_dialog():
    element_data = {
        'ele_label': "ele_" + rand.generate_random_string(),
        'ele_name': rand.generate_random_string(),
        'ele_desc': rand.generate_random_string(),
        'choose_type': "Text Box",
        'default_text_box': "Default text"
    }
    dialog = ServiceDialog(label=rand.generate_random_string(),
                           description="my dialog", submit=True, cancel=True,
                           tab_label="tab_" + rand.generate_random_string(),
                           tab_desc="my tab desc",
                           box_label="box_" + rand.generate_random_string(),
                           box_desc="my box desc")
    dialog.create(element_data)
开发者ID:petrblaho,项目名称:cfme_tests,代码行数:15,代码来源:test_service_dialog.py


注:本文中的cfme.automate.service_dialogs.ServiceDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。