def step_impl(context): """ :type context: behave.runner.Context """ text = form_m_saved_success_info_template.format( applicant=context.applicant_to_change_to, currency_amount="{} {:,.2f}".format(context.currency.code, context.form_m_data["amount"]), form_m_number=context.form_m_data["number"], ) nt.assert_in(text, context.browser.find_by_css(confirmation_dialog_css_selector).first.text)
def step_impl(context): """ :type context: behave.runner.Context """ # Will be reused in other steps context.confirmation_dialog = context.browser.find_by_css(confirmation_dialog_css_selector).first # Will be reused in other steps context.confirmation_dialog_debug_message = "Confirmation dialog text is:\n%s\nand must contain text:\n%s" text = form_m_saved_success_info_template.format( applicant=context.form_m_data['applicant'], form_m_number=context.form_m_data['number'], currency_amount='{} {:,.2f}'.format(context.currency.code, context.form_m_data['amount']) ) nt.assert_in(text, context.confirmation_dialog.text)