def test_button_crud(dialog, request): buttongroup = ButtonGroup( text=fauxfactory.gen_alphanumeric(), hover="btn_desc_{}".format(fauxfactory.gen_alphanumeric()), type=ButtonGroup.SERVICE) request.addfinalizer(buttongroup.delete_if_exists) buttongroup.create() button = Button(group=buttongroup, text=fauxfactory.gen_alphanumeric(), hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()), dialog=dialog, system="Request", request="InspectMe") request.addfinalizer(button.delete_if_exists) button.create() with update(button): button.hover = "edit_desc_{}".format(fauxfactory.gen_alphanumeric()) button.delete()
def test_button_crud(dialog, request): buttongroup = ButtonGroup(text=fauxfactory.gen_alphanumeric(), hover="btn_desc_{}".format( fauxfactory.gen_alphanumeric()), type=ButtonGroup.SERVICE) request.addfinalizer(buttongroup.delete_if_exists) buttongroup.create() button = Button(group=buttongroup, text=fauxfactory.gen_alphanumeric(), hover="btn_hvr_{}".format(fauxfactory.gen_alphanumeric()), dialog=dialog, system="Request", request="InspectMe") request.addfinalizer(button.delete_if_exists) button.create() with update(button): button.hover = "edit_desc_{}".format(fauxfactory.gen_alphanumeric()) button.delete()
def test_button_crud(dialog, request): """Test Creating a Button Prerequisities: * An Button Group Steps: * Create a Button with random button text and button hover text, and random request * Assert that the button 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 * Assert that the button no longer exists. """ buttongroup = ButtonGroup( text=fauxfactory.gen_alphanumeric(), hover=fauxfactory.gen_alphanumeric(), type=ButtonGroup.SERVICE ) request.addfinalizer(buttongroup.delete_if_exists) buttongroup.create() button = Button( group=buttongroup, text=fauxfactory.gen_alphanumeric(), hover=fauxfactory.gen_alphanumeric(), dialog=dialog, system="Request", request="InspectMe", ) request.addfinalizer(button.delete_if_exists) button.create() assert button.exists view = navigate_to(button, "Details") assert view.text.text == button.text assert view.hover.text == button.hover edited_hover = "edited {}".format(fauxfactory.gen_alphanumeric()) with update(button): button.hover = edited_hover assert button.exists view = navigate_to(button, "Details") assert view.hover.text == edited_hover button.delete(cancel=True) assert button.exists button.delete() assert not button.exists
def test_button_crud(dialog, request): """Test Creating a Button Prerequisities: * An Button Group Steps: * Create a Button with random button text and button hover text, and random request * Assert that the button 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 * Assert that the button no longer exists. """ buttongroup = ButtonGroup(text=fauxfactory.gen_alphanumeric(), hover=fauxfactory.gen_alphanumeric(), type=ButtonGroup.SERVICE) request.addfinalizer(buttongroup.delete_if_exists) buttongroup.create() button = Button(group=buttongroup, text=fauxfactory.gen_alphanumeric(), hover=fauxfactory.gen_alphanumeric(), dialog=dialog, system="Request", request="InspectMe") request.addfinalizer(button.delete_if_exists) button.create() assert button.exists view = navigate_to(button, 'Details') assert view.text.text == button.text assert view.hover.text == button.hover edited_hover = "edited {}".format(fauxfactory.gen_alphanumeric()) with update(button): button.hover = edited_hover assert button.exists view = navigate_to(button, 'Details') assert view.hover.text == edited_hover button.delete(cancel=True) assert button.exists button.delete() assert not button.exists