當前位置: 首頁>>代碼示例>>Python>>正文


Python ButtonGroup.delete方法代碼示例

本文整理匯總了Python中cfme.automate.buttons.ButtonGroup.delete方法的典型用法代碼示例。如果您正苦於以下問題:Python ButtonGroup.delete方法的具體用法?Python ButtonGroup.delete怎麽用?Python ButtonGroup.delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cfme.automate.buttons.ButtonGroup的用法示例。


在下文中一共展示了ButtonGroup.delete方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_button_group_crud

# 需要導入模塊: from cfme.automate.buttons import ButtonGroup [as 別名]
# 或者: from cfme.automate.buttons.ButtonGroup import delete [as 別名]
def test_button_group_crud(request):
    buttongroup = ButtonGroup(
        text=generate_random_string(), hover="btn_hvr", type=ButtonGroup.SERVICE)
    request.addfinalizer(buttongroup.delete_if_exists)
    buttongroup.create()
    with update(buttongroup):
        buttongroup.hover = "edit_desc_{}".format(generate_random_string())
    buttongroup.delete()
開發者ID:petrblaho,項目名稱:cfme_tests,代碼行數:10,代碼來源:test_buttons.py

示例2: test_button_group_crud

# 需要導入模塊: from cfme.automate.buttons import ButtonGroup [as 別名]
# 或者: from cfme.automate.buttons.ButtonGroup import delete [as 別名]
def test_button_group_crud(request):
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(), hover="btn_hvr", type=ButtonGroup.SERVICE)
    request.addfinalizer(buttongroup.delete_if_exists)
    buttongroup.create()
    with update(buttongroup):
        buttongroup.hover = "edit_desc_{}".format(fauxfactory.gen_alphanumeric())
    buttongroup.delete()
開發者ID:pombredanne,項目名稱:cfme_tests,代碼行數:10,代碼來源:test_buttons.py

示例3: test_button_group_crud

# 需要導入模塊: from cfme.automate.buttons import ButtonGroup [as 別名]
# 或者: from cfme.automate.buttons.ButtonGroup import delete [as 別名]
def test_button_group_crud(request):
    """Test Creating a Button Group

    Prerequisities:
        * An appliance

    Steps:
        * Create a Button Group with random button text and button hover text, select type Service
        * Assert that the button group exists
        * Assert that the entered values correspond with what is displayed on the details page
        * Change the hover text, ensure the text is changed on details page
        * Delete the button group
        * Assert that the button group no longer exists.
    """
    # Generate an object
    buttongroup = ButtonGroup(
        text=fauxfactory.gen_alphanumeric(),
        hover=fauxfactory.gen_alphanumeric(),
        type=ButtonGroup.SERVICE)
    # Ensure it gets deleted after the test
    request.addfinalizer(buttongroup.delete_if_exists)
    # 1) Create it
    buttongroup.create()
    # 2) Verify it exists
    assert buttongroup.exists
    # 3) Now the new part, go to the details page
    view = navigate_to(buttongroup, 'Details')
    # 4) and verify that the values in there indeed correspond to the values specified
    assert view.text.text == buttongroup.text
    assert view.hover.text == buttongroup.hover
    # 5) generate a random string for update test
    updated_hover = "edit_desc_{}".format(fauxfactory.gen_alphanumeric())
    # 6) Update it (this might go over multiple fields in the object)
    with update(buttongroup):
        buttongroup.hover = updated_hover
    # 7) Assert it still exists
    assert buttongroup.exists
    # 8) Go to the details page again
    view = navigate_to(buttongroup, 'Details')
    # 9) Verify it indeed equals to what it was set to before
    assert view.hover.text == updated_hover
    # 10) Delete it - first cancel and then real
    buttongroup.delete(cancel=True)
    assert buttongroup.exists
    buttongroup.delete()
    # 11) Verify it is deleted
    assert not buttongroup.exists
開發者ID:dajohnso,項目名稱:cfme_tests,代碼行數:49,代碼來源:test_buttons.py


注:本文中的cfme.automate.buttons.ButtonGroup.delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。