From ed5f10437aef8a22980cc25496ad4a0a9ff0894a Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 18 Aug 2020 20:03:30 -0700 Subject: [PATCH] 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 Reviewed-by: Joseph Nuthalapati --- plinth/modules/bepasty/tests/bepasty.feature | 9 +++++---- plinth/modules/bepasty/tests/test_functional.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plinth/modules/bepasty/tests/bepasty.feature b/plinth/modules/bepasty/tests/bepasty.feature index 6bcc64652..13c3166ee 100644 --- a/plinth/modules/bepasty/tests/bepasty.feature +++ b/plinth/modules/bepasty/tests/bepasty.feature @@ -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 diff --git a/plinth/modules/bepasty/tests/test_functional.py b/plinth/modules/bepasty/tests/test_functional.py index 58f1cd54a..36449227d 100644 --- a/plinth/modules/bepasty/tests/test_functional.py +++ b/plinth/modules/bepasty/tests/test_functional.py @@ -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)