def stop_music(context):
    if context.config.userdata[
            'mobile'] != 'default' and context.config.userdata[
                'mobile'] != 'no' and context.config.userdata[
                    'mobile'] != 'android':
        RegisterPage(context.driver).stop_mobile_music()
    else:
        RegisterPage(context.driver).stop_music()
def fill_part_reg_form(context, what):
    if what == "username":
        RegisterPage(context.driver).fill_fields(" ", context.password,
                                                 context.email)
    if what == "password":
        RegisterPage(context.driver).fill_fields(context.username, " ",
                                                 context.email)
    if what == "email":
        RegisterPage(context.driver).fill_fields(context.username,
                                                 context.password, " ")
def open_register(context):
    if context.config.userdata['mobile'] != "no":
        RegisterPage(context.driver).open_mobile_navbar()
    RegisterPage(context.driver).open_register()
def check_login_navbar(context):
    if context.config.userdata['mobile'] != 'no':
        RegisterPage(context.driver).open_mobile_navbar()
    assert LoginPage(context.driver).check_login(context.username)
def fill_reg_form(context):
    RegisterPage(context.driver).fill_fields(context.timestamp_username,
                                             context.timestamp_password,
                                             context.timestamp_email)
def submit_reg(context):
    RegisterPage(context.driver).press_submit()
def stop_music(context):
    RegisterPage(context.driver).stop_music()
def check_user_not_in_database(context):
    assert RegisterPage(context.driver).check_not_register()
def check_user_in_database(context):
    assert RegisterPage(context.driver).check_usr_in_db(
        context.timestamp_username)
def fill_reg_form(context):
    RegisterPage(context.driver).fill_fields(context.username,
                                             context.password, context.email)