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)
def given_i_am_logged_in_as_researcher(step): user = create_reseacher() world.page = LoginPage(world.browser) world.page.visit() world.page.login(user)
def login(user, world): world.page = LoginPage(world.browser) world.page.visit() world.page.login(user)
def given_i_am_logged_in_as_admin(step): user = create_admin() world.page = LoginPage(world.browser) world.page.visit() world.page.login(user)
def and_i_login_that_user(step): world.page = LoginPage(world.browser) world.page.visit() world.page.login(world.user)
def then_i_should_see_anonymous_user_allowed_tabs(step): world.page = LoginPage(world.browser) world.page.check_anonymous_user_allowed_tabs()
def and_i_login_a_user(step): world.page = LoginPage(world.browser) world.page.login(world.user)
def and_i_visit_the_login_page(step): world.page = LoginPage(world.browser) world.page.visit()