Пример #1
0
def _all_catalogitems_add_new(context):
    catalog_item_tree.click_path('All Catalog Items')
    tb_select('Add a New Catalog Item')
    provider_type = context['provider_type']
    sel.select("//select[@id='st_prov_type']", provider_type)


def _all_catalogbundle_add_new(context):
    sel.click("//div[@id='sandt_tree_div']//td[.='All Catalog Items']")
    tb_select('Add a New Catalog Bundle')


nav.add_branch(
    'services_catalogs', {
        'catalog_items': [
            nav.partial(accordion.click, 'Catalog Items'), {
                'catalog_item_new':
                _all_catalogitems_add_new,
                'catalog_item': [
                    lambda ctx: catalog_item_tree.click_path(
                        'All Catalog Items', ctx['catalog'], ctx[
                            'catalog_item'].name), {
                                'catalog_item_edit':
                                nav.partial(tb_select, "Edit this Item")
                            }
                ]
            }
        ]
    })

Пример #2
0
    version.pick({
        'default': "//div[@id='dialogs_tree_div']//table",
        '5.3': "//div[@id='dialogs_tree_div']//ul"
    }))


def _all_servicedialogs_add_new(context):
    service_dialog_tree.click_path('All Dialogs')
    cfg_btn('Add a new Dialog')
    sel.wait_for_element(label_form.label)


nav.add_branch(
    'automate_customization', {
        'service_dialogs': [
            nav.partial(accordion.click, 'Service Dialogs'), {
                'service_dialog_new':
                _all_servicedialogs_add_new,
                'service_dialog': [
                    lambda ctx: accordion.tree('Service Dialogs', ctx[
                        'dialog'].label), {
                            'service_dialog_edit':
                            nav.partial(cfg_btn, "Edit this Dialog")
                        }
                ]
            }
        ]
    })


class ServiceDialog(Updateable):
Пример #3
0
def _all_catalogitems_add_new(context):
    catalog_item_tree.click_path('All Catalog Items')
    tb_select('Add a New Catalog Item')
    provider_type = context['provider_type']
    sel.select("//select[@id='st_prov_type']", provider_type)


def _all_catalogbundle_add_new(context):
    sel.click("//div[@id='sandt_tree_div']//td[normalize-space(.)='All Catalog Items']")
    tb_select('Add a New Catalog Bundle')


nav.add_branch(
    'services_catalogs',
    {'catalog_items': [nav.partial(accordion.click, 'Catalog Items'),
        {'catalog_item_new': _all_catalogitems_add_new,
         'catalog_item': [lambda ctx: catalog_item_tree.
                          click_path('All Catalog Items',
                                     ctx['catalog'], ctx['catalog_item'].name),
                          {'catalog_item_edit': nav.partial(tb_select,
                                                            "Edit this Item")}]}]})


class Template(Pretty):
    pretty_attrs = ['name']

    def __init__(self, name):
        self.name = name

Пример #4
0
service_dialog_tree = Tree(
    version.pick({"default": "//div[@id='dialogs_tree_div']//table", "5.3": "//div[@id='dialogs_tree_div']//ul"})
)


def _all_servicedialogs_add_new(context):
    service_dialog_tree.click_path("All Dialogs")
    cfg_btn("Add a new Dialog")
    sel.wait_for_element(label_form.label)


nav.add_branch(
    "automate_customization",
    {
        "service_dialogs": [
            nav.partial(accordion.click, "Service Dialogs"),
            {
                "service_dialog_new": _all_servicedialogs_add_new,
                "service_dialog": [
                    lambda ctx: accordion.tree("Service Dialogs", ctx["dialog"].label),
                    {"service_dialog_edit": nav.partial(cfg_btn, "Edit this Dialog")},
                ],
            },
        ]
    },
)


class ServiceDialog(Updateable):
    def __init__(
        self,