summaryrefslogtreecommitdiff
path: root/service/test/functional/features/steps/backup_account.py
diff options
context:
space:
mode:
authorTayane Fernandes <tayane.rmf@gmail.com>2017-03-31 11:39:23 -0300
committerGitHub <noreply@github.com>2017-03-31 11:39:23 -0300
commitdadf39c1574d53612410371b8b639a159841eaf5 (patch)
treeb2ad876064ba53fda571bd6382277cc1ec0d4cac /service/test/functional/features/steps/backup_account.py
parent76454872267976c3cd16608a8371d27b062b062d (diff)
parented6c3c449b7a947901b45bdb0d0dc017560e7f78 (diff)
Merge pull request #1021 from pixelated/email-recovery-code
[#927] Creates functional tests for backup account flow
Diffstat (limited to 'service/test/functional/features/steps/backup_account.py')
-rw-r--r--service/test/functional/features/steps/backup_account.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/service/test/functional/features/steps/backup_account.py b/service/test/functional/features/steps/backup_account.py
index 914309f2..56d30211 100644
--- a/service/test/functional/features/steps/backup_account.py
+++ b/service/test/functional/features/steps/backup_account.py
@@ -14,9 +14,25 @@
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-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')
+
+@when(u'I go to the backup account page')
+@given(u'I go to the backup account page')
def backup_account_page(context):
context.browser.get(context.backup_account_url)
+
+
+@when(u'I submit my backup account')
+def submit_backup_email(context):
+ fill_by_css_selector(context, 'input[name="email"]', 'test@test.com')
+ find_element_by_css_selector(context, '.submit-button button[type="submit"]').click()
+
+
+@then(u'I see the confirmation of this submission')
+def confirmation_page(context):
+ find_element_by_css_selector(context, '.confirmation-container', timeout=50)