Esempio n. 1
0
def given_that_i_am_logged_in_as_a_regional_admin(step):
    world.user, world.region = create_regional_admin_with_no_permissions()
    world.user = assign('can_edit_questionnaire', world.user)
    world.user = assign('can_view_questionnaire', world.user)
    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(world.user, "pass")
Esempio n. 2
0
def given_i_am_a_logged_in_global_admin(step):
    user = create_global_admin_with_no_permissions('globaladmin', 'UNICEF')
    assign('can_edit_questionnaire', user)
    assign('can_view_users', user)

    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(user, 'pass')
Esempio n. 3
0
def given_i_am_logged_in_as_a_global_admin(step):
    user = create_global_admin_with_no_permissions(username='******')
    world.user = assign('can_view_users', user)
    world.user = assign('can_edit_questionnaire', world.user)

    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(world.user, "pass")
Esempio n. 4
0
def given_i_am_logged_in(step):
    world.user, world.uganda, world.region = create_user_with_no_permissions()
    world.user = assign('can_submit_responses', world.user)

    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(world.user, 'pass')
Esempio n. 5
0
def given_i_am_registered_user(step):
    world.user, world.uganda, world.region = create_user_with_no_permissions(username="******")
    assign('can_submit_responses', world.user)
Esempio n. 6
0
def given_i_am_a_logged_in_as_a_regional_admin(step):
    world.user, world.region = create_regional_admin_with_no_permissions()
    world.user = assign('can_edit_questionnaire', world.user)