# ๐ŸŽฏ 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 ``` --- ## ๐Ÿ“š **PART 2: MANDATORY PASSWORD RESET MODAL** **File:** `src/pages/designs/design-1/components/MandatoryPasswordResetModal.jsx` **Scope:** `mandatory_reset` **Total Attributes:** 14 --- ### **2.1 MODAL CONTAINER** | Element | Required Attribute | Line Reference | Priority | |---------|-------------------|----------------|----------| | Modal Overlay | `mandatory_reset__modal` | Line 150 | ๐Ÿ”ด CRITICAL | | Modal Content | `mandatory_reset__modal_content` | Line 156 | ๐ŸŸข OPTIONAL | **Implementation (Line 150):** ```jsx ``` --- ### **2.2 STEP 1: WELCOME SCREEN** | Element | Required Attribute | Line Reference | Priority | |---------|-------------------|----------------|----------| | Continue Button | `mandatory_reset__continue_button` | Line 248 | ๐Ÿ”ด CRITICAL | **Implementation (Line 248):** ```jsx Continue to Reset Password ``` --- ### **2.3 STEP 2: PASSWORD RESET FORM** | Element | Required Attribute | Line Reference | Priority | |---------|-------------------|----------------|----------| | Form Container | `mandatory_reset__form` | Line 283 | ๐Ÿ”ด CRITICAL | | Current Password Input | `mandatory_reset__current_password_input` | Line 290 | ๐Ÿ”ด CRITICAL | | Current Password Toggle | `mandatory_reset__current_password_toggle` | Line 305 | ๐ŸŸข OPTIONAL | | Current Password Error | `mandatory_reset__current_password_error` | Line 313 | ๐ŸŸก IMPORTANT | | New Password Input | `mandatory_reset__new_password_input` | Line 325 | ๐Ÿ”ด CRITICAL | | New Password Toggle | `mandatory_reset__new_password_toggle` | Line 340 | ๐ŸŸข OPTIONAL | | New Password Error | `mandatory_reset__new_password_error` | Line 348 | ๐ŸŸก IMPORTANT | | Confirm Password Input | `mandatory_reset__confirm_password_input` | Line 360 | ๐Ÿ”ด CRITICAL | | Confirm Password Toggle | `mandatory_reset__confirm_password_toggle` | Line 375 | ๐ŸŸข OPTIONAL | | Confirm Password Error | `mandatory_reset__confirm_password_error` | Line 383 | ๐ŸŸก IMPORTANT | | Back Button | `mandatory_reset__back_button` | Line 454 | ๐ŸŸก IMPORTANT | | Submit Button | `mandatory_reset__submit_button` | Line 464 | ๐Ÿ”ด CRITICAL | **Implementation Examples:** **Form (Line 283):** ```jsx
``` **Current Password Input (Line 290):** ```jsx ``` **Current Password Toggle (Line 305):** ```jsx