예제 #1
0
def given_i_am_logged_in_as_a_superuser(step):
    world.user = User.objects.create(username='******',
                                     email='*****@*****.**',
                                     password='******',
                                     first_name='some name',
                                     last_name='last_name')
    world.user.is_superuser = True
    world.user.save()
    UserProfile.objects.create(user=world.user, mobile_number='123456666')
    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(world.user)
예제 #2
0
def given_i_am_logged_in_as_researcher(step):
    user = create_reseacher()
    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(user)
예제 #3
0
def login(user, world):
    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(user)
예제 #4
0
def given_i_am_logged_in_as_admin(step):
    user = create_admin()
    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(user)
예제 #5
0
def and_i_login_that_user(step):
    world.page = LoginPage(world.browser)
    world.page.visit()
    world.page.login(world.user)
예제 #6
0
def then_i_should_see_anonymous_user_allowed_tabs(step):
    world.page = LoginPage(world.browser)
    world.page.check_anonymous_user_allowed_tabs()
예제 #7
0
def and_i_login_a_user(step):
    world.page = LoginPage(world.browser)
    world.page.login(world.user)
예제 #8
0
def and_i_visit_the_login_page(step):
    world.page = LoginPage(world.browser)
    world.page.visit()