# Scripts Directory

This directory contains utility scripts for automation testing.

## End-to-End Scripts

### `complete_profile_to_assessment.py`

**Purpose**: Complete student profile to 100% and navigate to assessments page.

**Usage**:
```bash
# Basic usage with default profile data
python scripts/complete_profile_to_assessment.py --cpid <CPID> --password <PASSWORD>

# With custom profile data from JSON file
python scripts/complete_profile_to_assessment.py --cpid <CPID> --password <PASSWORD> --profile-data profile_data_example.json

# Run in headless mode
python scripts/complete_profile_to_assessment.py --cpid <CPID> --password <PASSWORD> --headless
```

**Example**:
```bash
python scripts/complete_profile_to_assessment.py --cpid BATBAT311A --password Admin@123
python scripts/complete_profile_to_assessment.py --cpid DESDES29BB --password Admin@123 --profile-data scripts/profile_data_example.json
```

**What it does**:
1. ✅ Login with smart password handling (tries provided password, then Admin@123 if needed)
2. ✅ Handle password reset modal (if new student)
3. ✅ Handle profile incomplete modal (if profile < 100%)
4. ✅ Complete profile to 100% using provided data (or defaults)
5. ✅ Navigate to Assessments page
6. ✅ Verify student is assessment-ready

**Profile Data Format**:
See `profile_data_example.json` for the expected JSON structure.

**Options**:
- `--cpid`: Student CPID (required)
- `--password`: Student password (required)
- `--profile-data`: Path to JSON file with custom profile data (optional)
- `--headless`: Run in headless mode (optional)

---

## Other Scripts

### `complete_journey_test.py`
Complete student journey including assessments (full flow).

### `generate_synthetic_data.py`
Generate synthetic student data for testing.

### `process_students.py`
Process multiple students from Excel file.






