summaryrefslogtreecommitdiff
path: root/service/test/functional/features/steps
diff options
context:
space:
mode:
Diffstat (limited to 'service/test/functional/features/steps')
-rw-r--r--service/test/functional/features/steps/backup_account.py22
-rw-r--r--service/test/functional/features/steps/login.py5
2 files changed, 27 insertions, 0 deletions
diff --git a/service/test/functional/features/steps/backup_account.py b/service/test/functional/features/steps/backup_account.py
new file mode 100644
index 00000000..914309f2
--- /dev/null
+++ b/service/test/functional/features/steps/backup_account.py
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2017 ThoughtWorks, Inc.
+#
+# Pixelated is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Pixelated is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# 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
+
+
+@given(u'I am on the backup account page')
+def backup_account_page(context):
+ context.browser.get(context.backup_account_url)
diff --git a/service/test/functional/features/steps/login.py b/service/test/functional/features/steps/login.py
index 9ce37370..2d7be259 100644
--- a/service/test/functional/features/steps/login.py
+++ b/service/test/functional/features/steps/login.py
@@ -48,6 +48,11 @@ def click_logout(context):
find_element_by_css_selector(context, '#logout-form div').click()
+@when(u'I logout from the header')
+def click_logout(context):
+ find_element_by_css_selector(context, 'button[name="logout"]').click()
+
+
@then(u'I should see the login page')
def see_login_page(context):
find_element_by_css_selector(context, 'form#login_form')