Esempio n. 1
0
def test_suspend_user(fixture_webdriver):
    element = UsersPageElements(fixture_webdriver)

    UsersPageActions(fixture_webdriver).open_edit_user_page()
    EditUsersPageActions(fixture_webdriver).suspend_user()

    assert element.admin_email() in element.first_user_in_list().get_attribute(
        "textContent"), "First email in the list should be [email protected]"
Esempio n. 2
0
def test_delete_user_cancel(fixture_webdriver):
    element = UsersPageElements(fixture_webdriver)
    UsersPageActions(fixture_webdriver).open_edit_user_page()
    EditUsersPageActions(fixture_webdriver).cancel_deleting_user()

    assert element.admin_email() in \
           fixture_webdriver.find_element_by_xpath('//*[@id="users-region"]/table/tbody/tr[2]/td[1]').get_attribute(
               "textContent"), "Second email in the list should be [email protected]"

    UsersPageActions(fixture_webdriver).confirm_user_deleting()