# 🚨 URGENT: Missing data-testid Attributes - Mandatory Password Reset Modal **Date:** 2025-01-20 **Priority:** 🔴 **HIGH - Required for Automation Testing** **Component:** `MandatoryPasswordResetModal.jsx` **Scope:** `mandatory_reset` --- ## ⚠️ **CRITICAL ISSUE** **ALL data-testid attributes are MISSING** from the Mandatory Password Reset Modal component. **Impact:** - ❌ Automation tests cannot reliably find elements - ❌ Tests are taking 8+ minutes instead of < 1 minute - ❌ Password reset flow is failing - ❌ Using fragile XPath/CSS fallbacks (not reliable) **Solution:** Add all data-testid attributes listed below. --- ## 📋 **REQUIRED data-testid ATTRIBUTES** ### **Naming Convention:** - **Scope:** `mandatory_reset` - **Pattern:** `mandatory_reset__{element_name}` - **Format:** Lowercase with underscores --- ## **1. MODAL CONTAINER** | Element | Current Line | Required Attribute | Element Type | |---------|--------------|-------------------|--------------| | Modal Overlay | Line 150 | `mandatory_reset__modal` | `` (outer overlay) | | Modal Content | Line 156 | `mandatory_reset__modal_content` | `` (inner content) | **Current Code (Line 150):** ```jsx ``` **Required Fix:** ```jsx ``` **Current Code (Line 156):** ```jsx ``` **Required Fix:** ```jsx ``` --- ## **2. STEP 1: WELCOME SCREEN** | Element | Current Line | Required Attribute | Element Type | |---------|--------------|-------------------|--------------| | Continue Button | Line 248 | `mandatory_reset__continue_button` | `` | **Current Code (Line 248):** ```jsx Continue to Reset Password ``` **Required Fix:** ```jsx Continue to Reset Password ``` --- ## **3. STEP 2: PASSWORD RESET FORM** | Element | Current Line | Required Attribute | Element Type | |---------|--------------|-------------------|--------------| | Form Container | Line 283 | `mandatory_reset__form` | `
` | | Current Password Input | Line 290 | `mandatory_reset__current_password_input` | `` | | Current Password Toggle | Line 305 | `mandatory_reset__current_password_toggle` | `