@regression
@cloud
Feature: Login Feature
Description: As a CRM user
I want to login based on my assigned role
So that I can access only the authorized features in the CRM system
File name: login.feature
Relative path: feature/login.feature
@regression
@cloud
Scenario Outline: Validate successful login for "Super Admin"
Given
the CRM Organisation Selection page is displayed
00:00:06.923
When
the user logs in as a "Super Admin" with valid credentials
00:00:03.566
Then
the user should be redirected to the CRM dashboard
00:00:12.221
And
the user profile section should display the role "Super Admin"
00:00:00.023
@regression
@cloud
Scenario Outline: Validate successful login for "Health Consultant"
Given
the CRM Organisation Selection page is displayed
00:00:05.629
When
the user logs in as a "Health Consultant" with valid credentials
00:00:03.480
Then
the user should be redirected to the CRM dashboard
00:00:12.203
And
the user profile section should display the role "Health Consultant"
00:00:00.018
@regression
@cloud
Scenario Outline: Validate successful login for "Fitness Trainer"
Given
the CRM Organisation Selection page is displayed
00:00:05.301
When
the user logs in as a "Fitness Trainer" with valid credentials
00:00:03.524
Then
the user should be redirected to the CRM dashboard
00:00:12.138
And
the user profile section should display the role "Fitness Trainer"
00:00:00.017
@regression
@cloud
Scenario Outline: Validate successful login for "Dietician"
Given
the CRM Organisation Selection page is displayed
00:00:03.176
When
the user logs in as a "Dietician" with valid credentials
00:00:03.540
Then
the user should be redirected to the CRM dashboard
00:00:12.300
And
the user profile section should display the role "Dietician"
00:00:00.019
@regression
@cloud
Scenario Outline: Validate successful login for "Dietician Manager"
Given
the CRM Organisation Selection page is displayed
00:00:05.055
When
the user logs in as a "Dietician Manager" with valid credentials
00:00:03.527
Then
the user should be redirected to the CRM dashboard
00:00:08.890
And
the user profile section should display the role "Dietician Manager"
00:00:00.023
@regression
@cloud
Scenario Outline: Validate successful login for "Fitness Manager"
Given
the CRM Organisation Selection page is displayed
00:00:05.052
When
the user logs in as a "Fitness Manager" with valid credentials
00:00:03.508
Then
the user should be redirected to the CRM dashboard
00:00:12.152
And
the user profile section should display the role "Fitness Manager"
00:00:00.018
@regression
@cloud
Scenario Outline: Organisation Selection fails with empty value in email field
Given
the CRM Organisation Selection page is displayed
00:00:05.032
When
the user enters an "" value in email field for selcting organisation
00:00:00.028
And
clicks on next
00:00:00.080
Then
an error message "Please enter your email address." should be displayed
00:00:00.005
@regression
@cloud
Scenario Outline: Login fails with non registered email. used as "user@domai.com" in Organistaion Selection
Given
the CRM Organisation Selection page is displayed
00:00:05.359
When
the user enters an non registered email as "user@domai.com" in organisation selection
00:00:00.044
And
clicks on next
00:00:00.084
Then
an error message "No organizations found for this email." should be displayed
00:00:00.864
@regression
@cloud
Scenario Outline: Login fails with non registered email. used as "user@domain" in Organistaion Selection
Given
the CRM Organisation Selection page is displayed
00:00:04.956
When
the user enters an non registered email as "user@domain" in organisation selection
00:00:00.033
And
clicks on next
00:00:00.085
Then
an error message "Failed to discover organizations. Please try again." should be displayed
00:00:00.863
@regression
@cloud
Scenario Outline: Login fails when Password field is empty for "Super Admin"
Given
the CRM Organisation Selection page is displayed
00:00:05.079
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.108
When
the user leaves the password field empty ""
00:00:00.739
And
clicks on the login button
00:00:00.040
Then
an form validation message "Please fill out this field." should be displayed
00:00:00.040
@regression
@cloud
Scenario Outline: Login fails with incorrect password for "Super Admin"
Given
the CRM Organisation Selection page is displayed
00:00:05.113
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.105
When
the user enters an incorrect password as "abcd1234" for role "Super Admin"
00:00:00.396
And
clicks on the login button
00:00:00.030
And
an error message "Invalid username or password" should be displayed
00:00:00.858
@regression
@cloud
Scenario: Super Admin login fails securely with SQL injection in password
Given
the CRM Organisation Selection page is displayed
00:00:06.757
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.149
And
enters a SQL injection payload in the password field
00:00:00.380
And
clicks on the login button
00:00:00.035
And
an error message "Invalid username or password" should be displayed
00:00:00.862
Given
the CRM Organisation Selection page is displayed
00:00:05.148
When
the user logs in as a "Deactivated User" with valid credentials
00:00:03.612
Then
an error message "User is deactivated." should be displayed
00:00:02.863
Given
the CRM Organisation Selection page is displayed
00:00:04.837
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.087
When
the user tries to login with invalid email as "''"
00:00:00.094
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.007
Given
the CRM Organisation Selection page is displayed
00:00:05.143
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.136
When
the user tries to login with invalid email as "abcd"
00:00:00.078
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.009
@regression
@cloud
Scenario Outline: Login fails with invalid email "invalid-email-format@gmail"
Given
the CRM Organisation Selection page is displayed
00:00:03.153
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.048
When
the user tries to login with invalid email as "invalid-email-format@gmail"
00:00:00.095
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.007
@regression
@cloud
Scenario Outline: Login fails with invalid email "invalidemail.com"
Given
the CRM Organisation Selection page is displayed
00:00:05.110
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.067
When
the user tries to login with invalid email as "invalidemail.com"
00:00:00.079
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.007
@regression
@cloud
Scenario Outline: Login fails with invalid email "user@domain,com"
Given
the CRM Organisation Selection page is displayed
00:00:05.073
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.062
When
the user tries to login with invalid email as "user@domain,com"
00:00:00.091
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.007
@regression
@cloud
Scenario Outline: Login fails with invalid email "user@.com"
Given
the CRM Organisation Selection page is displayed
00:00:03.374
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.137
When
the user tries to login with invalid email as "user@.com"
00:00:00.097
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.007
@regression
@cloud
Scenario Outline: Login fails with invalid email "user@domain..com"
Given
the CRM Organisation Selection page is displayed
00:00:04.940
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.061
When
the user tries to login with invalid email as "user@domain..com"
00:00:00.079
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.007
@regression
@cloud
Scenario Outline: Login fails with invalid email "@domain.com"
Given
the CRM Organisation Selection page is displayed
00:00:04.960
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.056
When
the user tries to login with invalid email as "@domain.com"
00:00:00.094
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.008