@cloud
@regression
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
@cloud
@regression
Scenario Outline: Validate successful login for "Super Admin"
Given
the CRM Organisation Selection page is displayed
00:00:05.023
When
the user logs in as a "Super Admin" with valid credentials
00:00:03.549
Then
the user should be redirected to the CRM dashboard
00:00:12.225
And
the user profile section should display the role "Super Admin"
00:00:00.022
@cloud
@regression
Scenario Outline: Validate successful login for "Health Consultant"
Given
the CRM Organisation Selection page is displayed
00:00:03.230
When
the user logs in as a "Health Consultant" with valid credentials
00:00:03.825
Then
the user should be redirected to the CRM dashboard
00:00:12.391
And
the user profile section should display the role "Health Consultant"
00:00:00.020
@cloud
@regression
Scenario Outline: Validate successful login for "Fitness Trainer"
Given
the CRM Organisation Selection page is displayed
00:00:05.151
When
the user logs in as a "Fitness Trainer" with valid credentials
00:00:03.483
Then
the user should be redirected to the CRM dashboard
00:00:14.630
And
the user profile section should display the role "Fitness Trainer"
00:00:00.019
@cloud
@regression
Scenario Outline: Validate successful login for "Dietician"
Given
the CRM Organisation Selection page is displayed
00:00:04.981
When
the user logs in as a "Dietician" with valid credentials
00:00:03.812
Then
the user should be redirected to the CRM dashboard
00:00:12.099
And
the user profile section should display the role "Dietician"
00:00:00.021
@cloud
@regression
Scenario Outline: Validate successful login for "Dietician Manager"
Given
the CRM Organisation Selection page is displayed
00:00:03.094
When
the user logs in as a "Dietician Manager" with valid credentials
00:00:03.782
Then
the user should be redirected to the CRM dashboard
00:00:11.948
And
the user profile section should display the role "Dietician Manager"
00:00:00.019
@cloud
@regression
Scenario Outline: Validate successful login for "Fitness Manager"
Given
the CRM Organisation Selection page is displayed
00:00:05.061
When
the user logs in as a "Fitness Manager" with valid credentials
00:00:03.826
Then
the user should be redirected to the CRM dashboard
00:00:12.049
And
the user profile section should display the role "Fitness Manager"
00:00:00.019
@cloud
@regression
Scenario Outline: Organisation Selection fails with empty value in email field
Given
the CRM Organisation Selection page is displayed
00:00:04.876
When
the user enters an "" value in email field for selcting organisation
00:00:00.022
And
clicks on next
00:00:00.068
Then
an error message "Please enter your email address." should be displayed
00:00:00.006
@cloud
@regression
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:03.100
When
the user enters an non registered email as "user@domai.com" in organisation selection
00:00:00.041
And
clicks on next
00:00:00.097
Then
an error message "No organizations found for this email." should be displayed
00:00:00.863
@cloud
@regression
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.896
When
the user enters an non registered email as "user@domain" in organisation selection
00:00:00.036
And
clicks on next
00:00:00.093
Then
an error message "Failed to discover organizations. Please try again." should be displayed
00:00:00.870
@cloud
@regression
Scenario Outline: Login fails when Password field is empty for "Super Admin"
Given
the CRM Organisation Selection page is displayed
00:00:03.161
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.195
When
the user leaves the password field empty ""
00:00:00.738
And
clicks on the login button
00:00:00.045
Then
an form validation message "Please fill out this field." should be displayed
00:00:00.053
@cloud
@regression
Scenario Outline: Login fails with incorrect password for "Super Admin"
Given
the CRM Organisation Selection page is displayed
00:00:03.116
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.074
When
the user enters an incorrect password as "abcd1234" for role "Super Admin"
00:00:00.377
And
clicks on the login button
00:00:00.034
And
an error message "Invalid username or password" should be displayed
00:00:00.861
@cloud
@regression
Scenario: Super Admin login fails securely with SQL injection in password
Given
the CRM Organisation Selection page is displayed
00:00:05.289
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.134
And
enters a SQL injection payload in the password field
00:00:00.378
And
clicks on the login button
00:00:00.031
And
an error message "Invalid username or password" should be displayed
00:00:00.860
Given
the CRM Organisation Selection page is displayed
00:00:03.109
When
the user logs in as a "Deactivated User" with valid credentials
00:00:03.594
Then
an error message "User is deactivated." should be displayed
00:00:01.860