# ๐ฏ COMPLETE DATA-TESTID REQUIREMENTS
## For UI Development Team - All Components
**Date:** 2025-01-20
**Priority:** ๐ด **CRITICAL - BLOCKING AUTOMATION**
**Status:** โ **ALL ATTRIBUTES MISSING**
**Version:** 1.0 - Standalone Complete Document
---
## ๐ **EXECUTIVE SUMMARY**
This document contains **ALL** required `data-testid` attributes for automation testing across **ALL** components.
**Total Required Attributes:** ~214+ attributes across 2 components
### **Components Requiring Updates:**
1. **Student Profile Editor** (`StudentProfileEditor.jsx`) - ~200+ attributes
2. **Mandatory Password Reset Modal** (`MandatoryPasswordResetModal.jsx`) - 14 attributes
---
## ๐ **NAMING CONVENTION (MANDATORY - READ THIS FIRST)**
### **Pattern:**
```
{scope}__{element_name}_{type}
```
### **Rules:**
1. **Scope:** Component-specific scope (e.g., `profile_editor`, `mandatory_reset`)
2. **Separator:** **Double underscore** `__` between scope and element name
3. **Element Name:** **Snake_case** (lowercase with underscores)
4. **Type Suffix:**
- `_input` for text inputs
- `_select` for dropdowns
- `_textarea` for text areas
- `_checkbox` for checkboxes
- `_button` for buttons
- `_tab` for tab buttons
### **Examples:**
- โ
`profile_editor__first_name_input`
- โ
`mandatory_reset__continue_button`
- โ
`profile_editor__tab_personal_information`
- โ `profile_editor_first_name` (single underscore - WRONG)
- โ `profileEditor__first_name` (camelCase - WRONG)
### **Dynamic Elements:**
For dynamic elements (like checkboxes in lists), use:
```
{scope}__{base_name}__{formatted_option}
```
**Example:**
- `profile_editor__short_term_focus__01_academics`
- `profile_editor__strength__1_quick_learning`
---
## ๐ **PART 1: STUDENT PROFILE EDITOR**
**File:** `src/pages/StudentProfileEditor.jsx`
**Scope:** `profile_editor`
**Total Attributes:** ~200+
---
### **1.1 PAGE-LEVEL ELEMENTS**
| Element | Required Attribute | Line Reference | Priority |
|---------|-------------------|----------------|----------|
| Page container | `profile_editor__page` | Line 1516 | ๐ด CRITICAL |
| Progress value display | `profile_editor__progress_value` | Line 1577 | ๐ด CRITICAL |
| Missing fields toggle button | `profile_editor__missing_fields_toggle` | Line 1580-1586 | ๐ก IMPORTANT |
| Back button (header) | `profile_editor__back_button` | Line 1555-1560 | ๐ก IMPORTANT |
**Implementation:**
```jsx
{progress}%
```
---
### **1.2 TAB NAVIGATION**
| Element | Required Attribute | Line Reference | Priority |
|---------|-------------------|----------------|----------|
| Tab container | `profile_editor__tabs_container` | Line 1693-1700 | ๐ด CRITICAL |
| Tab scroll left button | `profile_editor__tabs_scroll_left_button` | Line 1683-1690 | ๐ก IMPORTANT |
| Tab scroll right button | `profile_editor__tabs_scroll_right_button` | Line 1729-1736 | ๐ก IMPORTANT |
#### **Tab Buttons (9 tabs) - ๐ด CRITICAL**
**Format:** `profile_editor__tab_{formatTestId(section.title)}`
| Tab Index | Tab Title | Required Attribute | Priority |
|-----------|-----------|-------------------|----------|
| 0 | Personal Information | `profile_editor__tab_personal_information` | ๐ด CRITICAL |
| 1 | Contact Information | `profile_editor__tab_contact_information` | ๐ด CRITICAL |
| 2 | Parent/Guardian | `profile_editor__tab_parent_guardian` | ๐ด CRITICAL |
| 3 | Education Details | `profile_editor__tab_education_details` | ๐ด CRITICAL |
| 4 | Focus Areas | `profile_editor__tab_focus_areas` | ๐ด CRITICAL |
| 5 | Self-Assessment | `profile_editor__tab_self_assessment` | ๐ด CRITICAL |
| 6 | Hobbies & Clubs | `profile_editor__tab_hobbies_clubs` | ๐ด CRITICAL |
| 7 | Achievements | `profile_editor__tab_achievements` | ๐ด CRITICAL |
| 8 | Expectations | `profile_editor__tab_expectations` | ๐ด CRITICAL |
**Implementation (Line 1703):**
```jsx