From 86671b34dec9802ddcc1142ac88b1b96f67f3db0 Mon Sep 17 00:00:00 2001 From: Prital Patel Date: Tue, 28 Jun 2016 23:38:51 +0530 Subject: [PATCH 1/3] users frontend scenario usong gherkin --- tests/acceptance/users_frontend.feature | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/acceptance/users_frontend.feature diff --git a/tests/acceptance/users_frontend.feature b/tests/acceptance/users_frontend.feature new file mode 100644 index 0000000000..0a5ca8ef02 --- /dev/null +++ b/tests/acceptance/users_frontend.feature @@ -0,0 +1,35 @@ +Feature: users_frontend + In order to manage users account in the web + As a user + I need to check user login and registration in joomla! CMS + + Background: + Given Joomla CMS is installed + Then I see the joomla! Home page + + Scenario: Create user and login in the frontend (index.php?option=com_users) + Given I login with username "prital" and password "prital" + When I press the login button + Then I should see the "Hi prital," on joomla frontpage + + Scenario: Create blocked user and try to login in the frontend + Given I create a user with fields Name "patel", Login Name "patel", Password "patel" and Email "patel@gmail.com" + And I block the user "patel" + When I login with username "patel" and password "patel" + And I press the login button + Then I should see the warning "Login denied! Your account has either been blocked or you have not activated it yet" + + Scenario: Test last login date + + + Scenario: Register a new user in the frontend and check it in the backend + Given I click on the link "Create an account" + And I create a user with fields Name "patel", Login Name "patel", Password "patel" and Email "patel@gmail.com" + + + Scenario: Check if block and activation are working + Given I unblock the user "patel" + When I login with username "patel" and password "patel" + Then I should see the message "Hi patel," + + Scenario: Change details in the frontend, check in the backend From ff0392fd16bcc16346462a8c531d053e3a025e85 Mon Sep 17 00:00:00 2001 From: Prital Patel Date: Thu, 30 Jun 2016 22:14:00 +0530 Subject: [PATCH 2/3] improve the users_frontend.feature file --- tests/acceptance/users_frontend.feature | 57 +++++++++++++++---------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/tests/acceptance/users_frontend.feature b/tests/acceptance/users_frontend.feature index 0a5ca8ef02..9aebcd055f 100644 --- a/tests/acceptance/users_frontend.feature +++ b/tests/acceptance/users_frontend.feature @@ -1,4 +1,4 @@ -Feature: users_frontend +Feature: Users Frontend In order to manage users account in the web As a user I need to check user login and registration in joomla! CMS @@ -7,29 +7,42 @@ Feature: users_frontend Given Joomla CMS is installed Then I see the joomla! Home page - Scenario: Create user and login in the frontend (index.php?option=com_users) - Given I login with username "prital" and password "prital" - When I press the login button - Then I should see the "Hi prital," on joomla frontpage - - Scenario: Create blocked user and try to login in the frontend - Given I create a user with fields Name "patel", Login Name "patel", Password "patel" and Email "patel@gmail.com" - And I block the user "patel" - When I login with username "patel" and password "patel" - And I press the login button - Then I should see the warning "Login denied! Your account has either been blocked or you have not activated it yet" - - Scenario: Test last login date - - - Scenario: Register a new user in the frontend and check it in the backend + Scenario: Create user from frontend (index.php?option=com_users) Given I click on the link "Create an account" - And I create a user with fields Name "patel", Login Name "patel", Password "patel" and Email "patel@gmail.com" + And I create a user with fields Name "patel", Username "patel", Password "patel" and Email "patel@gmail.com" + When I press the "Register" + Then I see the warning and notice message + But user is created + + Scenario: check the created user in the backend + Given There is a user manager page in administrator + When I search the user with user name "patel" + Then I should see the user "prital" + Scenario: Login with created user to assure it is blocked + Given A newly created user "patel" with password "patel" + When He press the "login" + Then He should see the "Login denied! Your account has either been blocked or you have not activated it yet." warning Scenario: Check if block and activation are working - Given I unblock the user "patel" - When I login with username "patel" and password "patel" - Then I should see the message "Hi patel," + Given There is a user manager page in administrator + And I unblock the user "patel" + And I active the user "patel" + When A login user "patel" with password "patel" + Then He should see the message "Hi patel," + + Scenario: Change user details in the frontend, check in the backend + Given I logged with user "patel" + And I press the "Edit Profile" + And I change name as a "patidar" + When I press the "submit" + Then Go to the user manager page in administrator + And I search the user with name "patidar" + And I sholud see the name "patidar" - Scenario: Change details in the frontend, check in the backend + Scenario: Test last login date + Given Needs to user "patel" logged in at least once + When I login as a super admin from backend + And Go to user manager page in administrator + Then I search for "patel" username + And I should see his last login date From 0e77a8d59d1d394d677892bfea0ec807b39bd177 Mon Sep 17 00:00:00 2001 From: Prital Patel Date: Fri, 1 Jul 2016 18:28:58 +0530 Subject: [PATCH 3/3] Update scenario last login date --- tests/acceptance/users_frontend.feature | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/acceptance/users_frontend.feature b/tests/acceptance/users_frontend.feature index 9aebcd055f..ee22143e06 100644 --- a/tests/acceptance/users_frontend.feature +++ b/tests/acceptance/users_frontend.feature @@ -43,6 +43,4 @@ Feature: Users Frontend Scenario: Test last login date Given Needs to user "patel" logged in at least once When I login as a super admin from backend - And Go to user manager page in administrator - Then I search for "patel" username - And I should see his last login date + Then I should see last login date