# Gherkin Sample Book

## Purpose
**SAMPLE DATA** - Example BDD/Gherkin `.feature` files for demonstration and testing purposes. These show realistic examples of how feature files will look when actual ops templates are defined.

Use these to:
- Understand Gherkin structure and patterns
- Compare Spanish vs English keywords
- Test tooling (behave, pytest-bdd, playwright-bdd)
- Demo the feature-flow pipeline

Real feature files will be derived from validated ops templates.

## Structure

```
gherkin-sample/
├── es/                    # Spanish keywords (Dado/Cuando/Entonces)
│   ├── pet-owner/
│   ├── veterinarian/
│   └── backoffice/
└── en/                    # English keywords (Given/When/Then)
    ├── pet-owner/
    ├── veterinarian/
    └── backoffice/
```

## Language Versions

**Spanish Keywords (`es/`)**
- Uses `# language: es` directive
- Keywords: Característica, Escenario, Dado, Cuando, Entonces, Y, Pero
- Keywords: Esquema del escenario, Ejemplos, Antecedentes, Regla
- For teams preferring Spanish BDD syntax

**English Keywords (`en/`)**
- Standard Gherkin syntax
- Keywords: Feature, Scenario, Given, When, Then, And, But
- Keywords: Scenario Outline, Examples, Background, Rule
- Same Spanish content, different keywords

## Feature Files

### Pet Owner (5 files)
| File | Description |
|------|-------------|
| 01-registro.feature | User registration flow |
| 02-reservar-turno.feature | Book appointment (turnero) |
| 03-gestion-mascotas.feature | Pet management |
| 04-pago-turno.feature | Payment flow |
| 05-historial-medico.feature | Medical history |

### Veterinarian (5 files)
| File | Description |
|------|-------------|
| 01-aceptar-solicitud.feature | Accept/reject requests |
| 02-gestion-agenda.feature | Schedule management |
| 03-realizar-visita.feature | Conduct visit & report |
| 04-zonas-cobertura.feature | Coverage area management |
| 05-historial-pacientes.feature | Patient history |

### Backoffice (5 files)
| File | Description |
|------|-------------|
| 01-gestion-solicitudes.feature | Request management |
| 02-gestion-usuarios.feature | User management |
| 03-gestion-servicios.feature | Services & pricing |
| 04-reembolsos.feature | Refund process |
| 05-reportes.feature | Reports & dashboard |

## Gherkin Patterns Used

### Basic
- Feature, Scenario, Given/When/Then

### Intermediate
- **Background**: Shared setup for all scenarios
- **Scenario Outline + Examples**: Test variations without duplication
- **Data Tables**: Multiple items in one step

### Advanced
- **Rule**: Group related scenarios
- **Doc Strings**: Large text blocks (diagnoses, reports)
- **Tags**: For filtering (@smoke, @critical, @wip)

## Comment Headers

Each file includes metadata comments:
```gherkin
# Fuente: album/book/ops-templates/...
# Drive: [Google Drive reference]
# Tests Backend: pytest tests/contracts/...
# Tests Frontend: npx playwright test ...
```

## Tools

To run/validate these files:

**Python**
- behave
- pytest-bdd

**JavaScript/TypeScript**
- playwright-bdd
- jest-cucumber

**IDE Support**
- VS Code: Cucumber (Gherkin) Full Support extension
- JetBrains: Built-in Gherkin plugin

## Source Templates

Sample ops templates at: `album/book/ops-templates-sample/`
