bepasty: tests: functional: Add a password before removing all

- Make fixtures more specific to avoid potential clashes with functional BDD
test fixtures of other apps.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
Sunil Mohan Adapa 2020-08-18 20:03:30 -07:00 committed by Joseph Nuthalapati
parent e03b6041d4
commit ed5f10437a
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35
2 changed files with 7 additions and 6 deletions

View File

@ -27,20 +27,21 @@ Scenario: Set default permissions to Read files
Scenario: Add password
Given the bepasty application is enabled
When I add a password
When I add a bepasty password
Then I should be able to login to bepasty with that password
Scenario: Remove password
Given the bepasty application is enabled
When I remove all passwords
When I add a bepasty password
When I remove all bepasty passwords
Then I should not be able to login to bepasty with that password
@backups
Scenario: Backup and restore bepasty
Given the bepasty application is enabled
When I add a password
When I add a bepasty password
And I create a backup of the bepasty app data with name test_bepasty
And I remove all passwords
And I remove all bepasty passwords
And I restore the bepasty app data backup with name test_bepasty
Then the bepasty site should be available
And I should be able to login to bepasty with that password

View File

@ -27,7 +27,7 @@ def set_default_permissions_list_read(session_browser):
_set_default_permissions(session_browser, 'read list')
@when('I add a password')
@when('I add a bepasty password')
def add_password(session_browser):
global last_password_added
_remove_all_passwords(session_browser)
@ -35,7 +35,7 @@ def add_password(session_browser):
last_password_added = _get_password(session_browser)
@when('I remove all passwords')
@when('I remove all bepasty passwords')
def remove_all_passwords(session_browser):
_remove_all_passwords(session_browser)