fssa-batch3 / fssa-batch3/sec_a_saran.selvaraj__corejava_project_2

User Module | Login Feature

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
enhancement User Module
Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## User Story: User Login

**As a registered user of the application**, I want to be able to log in securely so that I can access my account and the features reserved for authenticated users.

**Acceptance Criteria:**

### Scenario 1: User enters the login page.
- **Given** I am on the login page.
- **When** I see the login form.
- **Then** I should see fields for:
- Email
- Password

### Scenario 2: User submits the login form with valid credentials.
- **Given** I have entered my correct email and password.
- **When** I click the "Login" button.
- **Then** my login should be successful, and I should be redirected to the application's home page.

### Scenario 3: User submits the login form with incorrect email.
- **Given** I have entered an email that is not associated with an account.
- **When** I click the "Login" button.
- **Then** I should see an error message stating "Invalid email address."

### Scenario 4: User submits the login form with incorrect password.
- **Given** I have entered my correct email but an incorrect password.
- **When** I click the "Login" button.
- **Then** I should see an error message stating "Invalid password."

### Scenario 5: User successfully logs in.
- **Given** I have entered my correct email and password.
- **When** I click the "Login" button.
- **Then** my login should be successful, and I should be redirected to the application's home page.

### Scenario 6: User forgets the password and requests a reset.
- **Given** I have forgotten my password.
- **When** I click the "Forgot Password" link.
- **Then** I should be guided through the password reset process.

**End**

## DAO (Data Access Object)

- `findUserByEmail`

## Service

- `loginUser`

## Test

### TestLoginFeature

- `testLoginSuccess`
- `testLoginFailure`

## Flow Chart
```mermaid
graph TD;

subgraph Start
A[Initiate Login]
end;

A -->|User Enters Credentials| B[Validate Credentials];
B -->|Valid Credentials| C[Redirect to Home Page];
B -->|Invalid Credentials| D[Display Error Message];

C -->|Successful Login| E[Access Features];

D -->|Unsuccessful Login| F[Provide Guidance];

E -->|Access Granted| G[End];
F -->|Provide Guidance| G[End];
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.