@@ -20,7 +20,7 @@ You must use **Jest** or **Vitest** as the test runner and **React Testing Libra
2020
2121## Functional Requirements (max ** 100 points** )
2222
23- ### Feature 1: Test Coverage (** 20 points** )
23+ ### Feature 1: Test Coverage (** 14 points** )
2424
2525** As a** developer
2626** I want** to ensure high test coverage
@@ -38,7 +38,7 @@ You must use **Jest** or **Vitest** as the test runner and **React Testing Libra
3838- Branch, function, and line coverage are each at least 50%.
3939- Coverage is measured and reported using Jest or Vitest coverage tools.
4040
41- ### Feature 2: No Implementation Changes (** 10 points** )
41+ ### Feature 2: No Functional Changes (** 14 points** )
4242
4343** As a** developer
4444** I want** to test class components without modifying their logic
@@ -55,8 +55,9 @@ You must use **Jest** or **Vitest** as the test runner and **React Testing Libra
5555- No major changes are made to the logic or structure of class components during testing.
5656- Conversion to functional components is not performed.
5757- Only changes to improve testability are allowed, without altering behavior.
58+ - The logic and output of components should remain almost the same.
5859
59- ### Feature 3: Behavior-Focused Testing (** 15 points** )
60+ ### Feature 3: Behavior-Focused Testing (** 14 points** )
6061
6162** As a** developer
6263** I want** to test component behavior and public API
@@ -72,7 +73,7 @@ You must use **Jest** or **Vitest** as the test runner and **React Testing Libra
7273
7374- Tests focus on user-visible behavior and component outputs, not internal implementation details.
7475
75- ### Feature 4: API Mocking (** 15 points** )
76+ ### Feature 4: API Mocking (** 14 points** )
7677
7778** As a** developer
7879** I want** to mock all external API calls
@@ -90,7 +91,7 @@ You must use **Jest** or **Vitest** as the test runner and **React Testing Libra
9091- No real network requests are made during test execution.
9192- Tests cover both successful and error API responses using mocks.
9293
93- ### Feature 5: Error Handling (** 20 points** )
94+ ### Feature 5: Error Handling (** 14 points** )
9495
9596** As a** developer
9697** I want** to test error scenarios
@@ -107,7 +108,26 @@ You must use **Jest** or **Vitest** as the test runner and **React Testing Libra
107108- Tests simulate error conditions (e.g., failed API calls, thrown errors in components).
108109- Error boundaries are tested to ensure they catch and handle errors as expected.
109110
110- ### Feature 6: User Interactions (** 20 points** )
111+ ### Feature 6: User Interactions (** 14 points** )
112+
113+ ### Feature 7: LocalStorage Functionality Testing (** 16 points** )
114+
115+ ** As a** developer
116+ ** I want** to test localStorage integration in components
117+ ** So that** search terms and relevant data persist as expected
118+
119+ ** Scenario:** Test localStorage behavior
120+
121+ - ** Given** a component that uses localStorage
122+ - ** When** the component loads or user interacts
123+ - ** Then** localStorage is read from and written to as expected
124+
125+ ** Acceptance Criteria:**
126+
127+ - Tests verify that the component reads the correct value from localStorage on mount.
128+ - Tests verify that the component writes the correct value to localStorage after user actions (e.g., search).
129+ - Tests cover cases where localStorage is empty, contains a value, or is updated.
130+ - Tests ensure that localStorage integration does not break component behavior.
111131
112132** As a** developer
113133** I want** to test all user interactions
@@ -168,6 +188,16 @@ You must use **Jest** or **Vitest** as the test runner and **React Testing Libra
168188
169189### Penalties
170190
191+ - ** Absence of required features from the previous task (` class-components ` ) results in a penalty equal to the original feature's points:**
192+ - Application Layout Structure: ** -5 points**
193+ - Search Functionality with Local Storage: ** -15 points**
194+ - Search Results Display: ** -10 points**
195+ - Initial Data Load: ** -10 points**
196+ - Search Execution: ** -20 points**
197+ - Search Term Persistence: ** -5 points**
198+ - Loading State Indication: ** -10 points**
199+ - Error Handling: ** -10 points**
200+ - Application Error Boundary: ** -15 points**
171201- ** 1. TypeScript & Code Quality**
172202 - TypeScript isn't used: ** -95 points**
173203 - Usage of _ any_ : ** -20 points per each**
0 commit comments