# UI Test Files

This directory contains JSON action playback tests for the Mosis Designer.

## Running Tests

```bash
# From designer/build directory
./Release/mosis-designer.exe --simulator --test-apps base-apps \
    --playback ../../tests/test_settings.json \
    --screenshot-after ../../tests/screenshots/result.png
```

## Test Files

| File | Description |
|------|-------------|
| `test_home_only.json` | Wait and capture home screen |
| `test_settings.json` | Navigate to Settings app |
| `test_browser.json` | Navigate to Browser (dock) |
| `test_messages.json` | Navigate to Messages app |
| `test_messages_v2.json` | Messages with corrected coordinates |
| `test_music.json` | Navigate to Music app |
| `test_store.json` | Navigate to Mosis Store |
| `test_navigation.json` | Multi-app navigation sequence |

## Screenshots

Captured screenshots are in `screenshots/`:
- `screenshot_home_fresh.png` - Home screen
- `screenshot_browser.png` - Browser app
- `screenshot_messages_fixed.png` - Messages app
- `screenshot_music_fixed.png` - Music app
- `screenshot_settings_fixed.png` - Settings app
- `screenshot_store_fixed.png` - Mosis Store

## Hierarchy Dumps

- `hierarchy_fresh.json` - Full UI element tree with bounds
- `hierarchy_dump.json` - Previous hierarchy capture

Use hierarchy dumps to find element coordinates for new tests.

## Prerequisites

Before running tests with `base-apps`, ensure shared assets exist at `MosisService/` root:

```bash
# Copy shared assets (run from MosisService/)
cp -r src/main/assets/ui .
cp -r src/main/assets/scripts .
cp -r src/main/assets/icons .
```

See `docs/TESTING-FRAMEWORK.md` for full documentation.
