@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:04.966
When
the user logs in as a "Super Admin" with valid credentials
00:00:03.852
Then
the user should be redirected to the CRM dashboard
00:00:09.773
And
the user profile section should display the role "Super Admin"
00:00:00.043
@regression
@cloud
Scenario Outline: Validate successful login for "Health Consultant"
Given
the CRM Organisation Selection page is displayed
00:00:05.352
When
the user logs in as a "Health Consultant" with valid credentials
00:00:03.797
Then
the user should be redirected to the CRM dashboard
00:00:10.851
And
the user profile section should display the role "Health Consultant"
00:00:00.042
@regression
@cloud
Scenario Outline: Validate successful login for "Fitness Trainer"
Given
the CRM Organisation Selection page is displayed
00:00:03.542
When
the user logs in as a "Fitness Trainer" with valid credentials
00:00:03.768
Then
the user should be redirected to the CRM dashboard
00:00:10.778
And
the user profile section should display the role "Fitness Trainer"
00:00:00.010
@regression
@cloud
Scenario Outline: Validate successful login for "Dietician"
Given
the CRM Organisation Selection page is displayed
00:00:03.898
When
the user logs in as a "Dietician" with valid credentials
00:00:03.719
Then
the user should be redirected to the CRM dashboard
00:00:12.827
And
the user profile section should display the role "Dietician"
00:00:00.020
@regression
@cloud
Scenario Outline: Validate successful login for "Dietician Manager"
Given
the CRM Organisation Selection page is displayed
00:00:05.724
When
the user logs in as a "Dietician Manager" with valid credentials
00:00:03.827
Then
the user should be redirected to the CRM dashboard
00:00:10.793
And
the user profile section should display the role "Dietician Manager"
00:00:00.018
@regression
@cloud
Scenario Outline: Validate successful login for "Fitness Manager"
Given
the CRM Organisation Selection page is displayed
00:00:05.130
When
the user logs in as a "Fitness Manager" with valid credentials
00:00:03.790
Then
the user should be redirected to the CRM dashboard
00:00:09.768
And
the user profile section should display the role "Fitness Manager"
00:00:00.013
@regression
@cloud
Scenario Outline: Validate successful login for "Admin" with Company Selection
Given
the CRM Organisation Selection page is displayed
00:00:05.092
When
the user logs in as a "Admin" with valid credentials
00:00:03.824
Then
the user should be redirected to the CRM dashboard after selecting company
00:00:11.000
And
the user profile section should display the role "Admin"
00:00:00.014
@regression
@cloud
Scenario Outline: Organisation Selection fails with empty value in email field
Given
the CRM Organisation Selection page is displayed
00:00:04.968
When
the user enters an "" value in email field for selcting organisation
00:00:00.165
And
clicks on next
00:00:00.102
Then
an error message "Please enter your email address." should be displayed
00:00:00.013
@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:03.431
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.115
Then
an error message "No organizations found for this email." should be displayed
00:00:00.884
@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:05.814
When
the user enters an non registered email as "user@domain" in organisation selection
00:00:00.043
And
clicks on next
00:00:00.169
Then
an error message "Failed to discover organizations. Please try again." should be displayed
00:00:00.895
@regression
@cloud
Scenario Outline: Login fails when Password field is empty for "Super Admin"
Given
the CRM Organisation Selection page is displayed
00:00:03.291
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.712
When
the user leaves the password field empty ""
00:00:00.030
And
clicks on the login button
00:00:00.044
Then
an form validation message "Please fill out this field." should be displayed
00:00:00.039
@regression
@cloud
Scenario Outline: Login fails with incorrect password for "Super Admin"
Given
the CRM Organisation Selection page is displayed
00:00:07.809
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.680
When
the user enters an incorrect password as "abcd1234" for role "Super Admin"
00:00:00.037
And
clicks on the login button
00:00:00.049
And
an error message "Invalid username or password" should be displayed
00:00:00.864
@regression
@cloud
Scenario: Super Admin login fails securely with SQL injection in password
Given
the CRM Organisation Selection page is displayed
00:00:05.197
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.797
And
enters a SQL injection payload in the password field
00:00:00.021
And
clicks on the login button
00:00:00.051
And
an error message "Invalid username or password" should be displayed
00:00:00.865
Given
the CRM Organisation Selection page is displayed
00:00:05.044
When
the user logs in as a "Deactivated User" with valid credentials
00:00:03.846
Then
an error message "User is deactivated." should be displayed
00:00:01.869
Given
the CRM Organisation Selection page is displayed
00:00:05.253
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.824
When
the user tries to login with invalid email as ""
00:00:01.209
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.028
Given
the CRM Organisation Selection page is displayed
00:00:03.250
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.697
When
the user tries to login with invalid email as "abcd"
00:00:01.192
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.015
@regression
@cloud
Scenario Outline: Login fails with invalid email "invalid-email-format@gmail"
Given
the CRM Organisation Selection page is displayed
00:00:03.390
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.656
When
the user tries to login with invalid email as "invalid-email-format@gmail"
00:00:01.229
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.021
@regression
@cloud
Scenario Outline: Login fails with invalid email "invalidemail.com"
Given
the CRM Organisation Selection page is displayed
00:00:05.210
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.721
When
the user tries to login with invalid email as "invalidemail.com"
00:00:01.239
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.024
@regression
@cloud
Scenario Outline: Login fails with invalid email "user@domain,com"
Given
the CRM Organisation Selection page is displayed
00:00:03.221
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.694
When
the user tries to login with invalid email as "user@domain,com"
00:00:01.202
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.014
@regression
@cloud
Scenario Outline: Login fails with invalid email "user@.com"
Given
the CRM Organisation Selection page is displayed
00:00:03.345
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.635
When
the user tries to login with invalid email as "user@.com"
00:00:01.232
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.025
@regression
@cloud
Scenario Outline: Login fails with invalid email "user@domain..com"
Given
the CRM Organisation Selection page is displayed
00:00:04.064
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:03.764
When
the user tries to login with invalid email as "user@domain..com"
00:00:01.209
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.024
@regression
@cloud
Scenario Outline: Login fails with invalid email "@domain.com"
Given
the CRM Organisation Selection page is displayed
00:00:03.313
Given
the user is on the login page with email pre-filled for role "Super Admin"
00:00:04.000
When
the user tries to login with invalid email as "@domain.com"
00:00:01.215
Then
an error message "Please enter a valid email address." should be displayed in login page
00:00:00.016