From 715419e88dcbc4d5f0b8286d917b26b8d425d85b Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Mon, 20 Mar 2017 15:45:41 -0300 Subject: [#927] Creates functional tests for backup account flow with @tayanefernandes --- .../test/functional/features/steps/backup_account.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'service/test/functional/features/steps/backup_account.py') diff --git a/service/test/functional/features/steps/backup_account.py b/service/test/functional/features/steps/backup_account.py index 914309f2..916198f6 100644 --- a/service/test/functional/features/steps/backup_account.py +++ b/service/test/functional/features/steps/backup_account.py @@ -14,9 +14,24 @@ # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see . -from behave import given +from behave import given, when, then + +from common import ( + fill_by_css_selector, + find_element_by_css_selector) @given(u'I am on the backup account page') def backup_account_page(context): context.browser.get(context.backup_account_url) + + +@when(u'I submit my email') +def submit_backup_email(context): + fill_by_css_selector(context, 'input[name="email"]', 'test@test.com') + find_element_by_css_selector(context, 'button[type="submit"]').click() + + +@then(u'I see the confirmation page') +def confirmation_page(context): + find_element_by_css_selector(context, '.confirmation-container') -- cgit v1.2.3