本文整理汇总了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))
示例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
示例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)
示例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()
示例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
示例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()
示例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)
示例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
示例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
示例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)
示例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)
示例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
示例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
示例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)
示例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)