siesa-agents 2.1.72-qa.25 → 2.1.72-qa.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude/skills/sa-docs-quality-process/SKILL.md +91 -0
- package/package.json +1 -1
- package/siesa-agents/resources/playwright-kit/.env.example +6 -5
- package/siesa-agents/resources/playwright-kit/README.md +22 -18
- package/siesa-agents/resources/playwright-kit/helpers/blazor-e2e-helpers.ts +6 -9
- package/siesa-agents/resources/playwright-kit/playwright.config.ts +1 -1
- package/siesa-agents/resources/playwright-kit/reporters/agiletest-reporter.ts +11 -10
- package/siesa-agents/resources/playwright-kit/specs/architecture-brief-siesa-erp.md +1 -3
- package/siesa-agents/resources/playwright-kit/tests/seed-example.spec.ts +5 -5
- package/siesa-agents/resources/playwright-kit/tools/locator-recorder.spec.ts +4 -4
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sa-docs-quality-process
|
|
3
|
+
description: Living documentation and teacher for the SIESA QA quality-process workflow. Use this skill to EXPLAIN — never to execute — the six phases of the QA quality process: what each phase does, the order they run in, what inputs each requires, what artifacts it produces, and the exact command to run it. Trigger whenever the user asks about the quality process, e.g. "explícame la fase N del quality process", "¿qué fase me toca ahora?", "¿qué necesito para el DOR gate?", "¿para qué sirve la fase de diseño / datos QA / AgileTest / E2E?", "¿en qué orden van las fases QA?", "no entiendo el proceso de calidad", "cómo uso el quality process", or the explicit invocation /sa-docs-quality-process. Answer in Spanish and read the workflow.md source of truth before answering — do NOT answer QA-process questions from memory.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QA Quality Process — Living Documentation (Teacher)
|
|
7
|
+
|
|
8
|
+
You are a **teacher and living documentation** for the SIESA QA `quality-process` workflow. Your job is to help the user *understand and navigate* the process: explain phases, tell them which phase comes next, list what a phase needs and produces, and hand them the exact command to run it.
|
|
9
|
+
|
|
10
|
+
**You do NOT execute phases.** Executing a phase (reading source docs, generating a test plan, hitting the DB, creating Jira issues, running Playwright) is the job of the real workflow, invoked with `/sa-quality-process`. Your role stops at guidance. If the user says "run phase 3", explain what it does and tell them to run `/sa-quality-process`, then pick phase 3.
|
|
11
|
+
|
|
12
|
+
## Communicate in Spanish
|
|
13
|
+
|
|
14
|
+
Always answer the user in Spanish — this is the team's language. (This file is in English per authoring convention, but your replies are Spanish.)
|
|
15
|
+
|
|
16
|
+
## Source of truth — read it before answering
|
|
17
|
+
|
|
18
|
+
The authoritative definition of every phase lives in one file. **Read it before answering any question about the process** — never answer from memory, because the workflow changes (phases get refined, inputs move between phases, items get discarded).
|
|
19
|
+
|
|
20
|
+
- **Workflow:** `_siesa-agents/bmm/workflows/3-solutioning/quality-process/workflow.md`
|
|
21
|
+
- **Phase prompts (the megaprompts each phase runs):** `_siesa-agents/bmm/workflows/3-solutioning/quality-process/prompts/`
|
|
22
|
+
- `prompt_test_plan.md` (Fase 1), `prompt_dor_gate.md` (Fase 2), `prompt_design_test.md` (Fase 3), `prompt_playwright_impl.md` + `prompt_e2e_executor.md` (Fase 6)
|
|
23
|
+
|
|
24
|
+
When a question is specific to one phase's internal logic (e.g. "how does the DOR gate score PRD completeness?", "what levels does the design phase use?"), open the relevant prompt file too — that's where the detail lives.
|
|
25
|
+
|
|
26
|
+
**How to use the source:** for a general "explain the process" question, the phase map below is enough. For anything specific — a phase's exact inputs, its outputs, its gates, discarded items, folder paths — read the matching section of `workflow.md` and quote what it actually says. If the file disagrees with the map below, the file wins; the map is a quick index, not the authority.
|
|
27
|
+
|
|
28
|
+
## The six phases at a glance
|
|
29
|
+
|
|
30
|
+
The process is run by the assigned QA. Phases are complementary; some depend on artifacts produced by earlier ones.
|
|
31
|
+
|
|
32
|
+
| # | Fase | Requires | Produces |
|
|
33
|
+
|---|------|----------|----------|
|
|
34
|
+
| 1 | **Planeación** | Project source docs: PRD, Architecture, Epics | `test-plan.md` (scope, risk matrix R=I×P, Go/No-Go) |
|
|
35
|
+
| 2 | **DOR Gate** | PRD + Architecture | `dor-report.md` (pass/fail per item; blocks build if completeness < 90%) |
|
|
36
|
+
| 3 | **Diseño** | `feature-status.yaml` + epic files (optionally uses Fase 1 test-plan as context) | `test-design.md`, `test-design.yml`, `test-cases.csv` |
|
|
37
|
+
| 4 | **Generación de Datos QA** | **Fase 3** `test-cases.csv` + a connected DB MCP | `test-data.md`, `seed.sql`, `rollback.sql` |
|
|
38
|
+
| 5 | **Registro AgileTest** | **Fase 3** `test-design.yml` (validated by QA) + Jira/AgileTest credentials | Jira issues: Requirements, Test Cases, Test Plans (PPR), Execution Plans (PEP) |
|
|
39
|
+
| 6 | **Implementación + Ejecución E2E** | **Fase 3** `test-design.yml`/`test-cases.csv` [+ **Fase 4** `test-data.md`] + Playwright Kit + `.env` | `.spec.ts` tests + reports (Allure/Monocart/test-results) |
|
|
40
|
+
|
|
41
|
+
### Dependency map (what unlocks what)
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Fase 1 (Planeación) ─┐
|
|
45
|
+
├─→ (context) ─→ Fase 3 (Diseño) ─┬─→ Fase 4 (Datos QA) [needs test-cases.csv]
|
|
46
|
+
Fase 2 (DOR Gate) ───┘ ├─→ Fase 5 (AgileTest) [needs test-design.yml]
|
|
47
|
+
└─→ Fase 6 (E2E) [needs .yml/.csv, +F4 data optional]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- **Fase 1 and Fase 2 are independent** starting points — they only need project docs, not each other. Fase 1 feeds Fase 3 as context (not a hard block); Fase 2 is a gate before any build/QA work starts.
|
|
51
|
+
- **Fase 3 is the hinge.** Fases 4, 5 and 6 all consume Fase 3's outputs. Nothing downstream runs without a design.
|
|
52
|
+
- **Fase 4 → Fase 6** is a soft link: Fase 6 uses Fase 4's `test-data.md` if it exists, but can fall back to the data embedded in the design.
|
|
53
|
+
- After Fase 6 there is a **Fase 7 (RCA)** for root-cause analysis of failures — it is *not* part of this workflow's phase menu, but reads Fase 6's reports.
|
|
54
|
+
|
|
55
|
+
## How to answer "which phase am I on / what's next?"
|
|
56
|
+
|
|
57
|
+
To orient the user, check which artifacts already exist in the implementation artifacts folder (`{implementation_artifacts}/quality-process/`, resolved from `_bmad/bmm/config.yaml`):
|
|
58
|
+
|
|
59
|
+
- `planeacion/test-plan-*/` → Fase 1 done
|
|
60
|
+
- `dor/dor-report-*/` → Fase 2 done
|
|
61
|
+
- `diseno/test-design-*/` (with `test-design.yml`, `test-cases.csv`) → Fase 3 done
|
|
62
|
+
- `datos/data-gen-*/` → Fase 4 done
|
|
63
|
+
- `playwright/e2e-run-*/` → Fase 6 done
|
|
64
|
+
|
|
65
|
+
From what exists, tell them the next sensible phase and why. Don't invent status — if you can't read the folder, say what each phase needs and let them tell you what they have.
|
|
66
|
+
|
|
67
|
+
## Answering format
|
|
68
|
+
|
|
69
|
+
Keep it a chat explanation in Spanish — no files generated. Match the question:
|
|
70
|
+
|
|
71
|
+
- **"Explain phase N"** → what it does + prerequisites + artifacts produced + the command to run it. Pull the specifics from `workflow.md`'s `FASE N` section.
|
|
72
|
+
- **"What order / how does it all fit?"** → the phase map + dependency map above.
|
|
73
|
+
- **"What do I need for phase N?"** → its Requires column, spelled out (which files, which config, which MCP/credentials), from the source.
|
|
74
|
+
- **"How do I run it?"** → the command below, and which number to pick.
|
|
75
|
+
|
|
76
|
+
End phase explanations with the concrete next action.
|
|
77
|
+
|
|
78
|
+
## Running the real phase
|
|
79
|
+
|
|
80
|
+
You explain; the workflow executes. The command to run any phase for real:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
/sa-quality-process
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
It asks at startup which phase (1–6) to run. Tell the user which number to pick for what they described. (Fase 3 also accepts an optional `feature_id` parameter to scope the design to one feature.)
|
|
87
|
+
|
|
88
|
+
**Example**
|
|
89
|
+
|
|
90
|
+
Usuario: "no entiendo para qué sirve la fase de datos QA y qué necesito"
|
|
91
|
+
Respuesta (en español): explica que la Fase 4 provisiona en la BD real, vía MCP, los datos sintéticos que los casos de la Fase 3 necesitan; reutiliza datos existentes antes de generar, inserta solo lo faltante bajo aprobación humana, y entrega `test-data.md` + `seed.sql` + `rollback.sql`. Requiere: la Fase 3 completada (`test-cases.csv`) y un MCP de base de datos conectado. Para ejecutarla: `/sa-quality-process` → opción 4.
|
package/package.json
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
# ============================================================
|
|
6
6
|
|
|
7
7
|
# Credenciales de login (Modo 1: ERP SIESA)
|
|
8
|
-
TEST_USER=
|
|
9
|
-
TEST_PASS=
|
|
8
|
+
TEST_USER=
|
|
9
|
+
TEST_PASS=
|
|
10
|
+
# ^^^ Definir con las credenciales de tu proyecto
|
|
10
11
|
|
|
11
|
-
# URL base del
|
|
12
|
-
BASE_URL=
|
|
12
|
+
# URL base del ambiente QA de tu proyecto (ej: https://qa.finance.siesa.dev)
|
|
13
|
+
BASE_URL=
|
|
13
14
|
|
|
14
15
|
# Base de datos a seleccionar en login (busca por texto en el combo)
|
|
15
16
|
# Opciones tipicas: sqlserver, postgresql
|
|
@@ -18,7 +19,7 @@ DB_ENGINE=sqlserver
|
|
|
18
19
|
# Cultura/idioma (comentar para usar la predeterminada del ERP)
|
|
19
20
|
# CULTURE=es-CO
|
|
20
21
|
|
|
21
|
-
# Ruta inicial del modulo a verificar/grabar (opcional, ej: /
|
|
22
|
+
# Ruta inicial del modulo a verificar/grabar (opcional, ej: /BLTuModulo/)
|
|
22
23
|
# Usada por seed-example.spec.ts (test de navegacion) y por el grabador.
|
|
23
24
|
# START_URL=
|
|
24
25
|
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
Kit portable para automatización E2E con agentes IA (Planner → Generator → Healer).
|
|
6
6
|
Desarrollado por el equipo QA de I&D — Procesos y Calidad de Software.
|
|
7
7
|
|
|
8
|
-
Validado en
|
|
9
|
-
|
|
8
|
+
Validado en múltiples proyectos Siesa (HCM, Financiero, Nómina),
|
|
9
|
+
con mejoras de tiempo de pipeline de **160 min → 4 min** en réplicas consecutivas sin Healer.
|
|
10
10
|
|
|
11
11
|
## Estructura
|
|
12
12
|
|
|
@@ -49,7 +49,7 @@ npm install
|
|
|
49
49
|
npx playwright install chromium
|
|
50
50
|
|
|
51
51
|
# 4. Verificar con el seed
|
|
52
|
-
TEST_USER
|
|
52
|
+
TEST_USER=<tu_usuario> TEST_PASS=<tu_password> npx playwright test tests/seed-example.spec.ts --headed
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## Reportes de ejecución
|
|
@@ -156,7 +156,7 @@ Ajustar `playwright.config.ts`:
|
|
|
156
156
|
|
|
157
157
|
```typescript
|
|
158
158
|
use: {
|
|
159
|
-
baseURL: process.env.BASE_URL || '
|
|
159
|
+
baseURL: process.env.BASE_URL || 'http://localhost:5000',
|
|
160
160
|
}
|
|
161
161
|
```
|
|
162
162
|
|
|
@@ -164,9 +164,9 @@ Variables de entorno:
|
|
|
164
164
|
|
|
165
165
|
| Variable | Default | Descripción |
|
|
166
166
|
|----------|---------|-------------|
|
|
167
|
-
| `BASE_URL` |
|
|
168
|
-
| `TEST_USER` |
|
|
169
|
-
| `TEST_PASS` |
|
|
167
|
+
| `BASE_URL` | (definir en .env) | URL base del ambiente QA |
|
|
168
|
+
| `TEST_USER` | (definir en .env) | Usuario ERP |
|
|
169
|
+
| `TEST_PASS` | (definir en .env) | Contraseña ERP |
|
|
170
170
|
| `DB_ENGINE` | `sqlserver` | BD a seleccionar en el login (match por texto) |
|
|
171
171
|
| `PORTAL_LOGIN` | - | `1` para login Portal de Empleo |
|
|
172
172
|
| `PORTAL_URL` | - | URL del portal |
|
|
@@ -197,20 +197,24 @@ Variables de entorno:
|
|
|
197
197
|
|
|
198
198
|
## Resultados validados
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
|
205
|
-
|
|
206
|
-
|
|
|
207
|
-
|
|
|
200
|
+
Kit validado en múltiples proyectos Siesa (HCM, Financiero, Nómina). La tabla
|
|
201
|
+
siguiente conserva, a modo de historial, la evolución del tiempo de pipeline
|
|
202
|
+
durante el piloto (réplicas consecutivas sin Healer):
|
|
203
|
+
|
|
204
|
+
| Réplica | Tests | Resultado | Tiempo Pipeline | Tiempo Ejecución |
|
|
205
|
+
|---------|-------|-----------|-----------------|------------------|
|
|
206
|
+
| R1 | 20 | 20/20 PASS | ~160 min | ~8 min |
|
|
207
|
+
| R3 | 21 | 20/21 PASS | ~40 min | 4.2 min |
|
|
208
|
+
| R4 | 16 | 16/16 PASS | ~35 min | 5.2 min |
|
|
209
|
+
| R5-R7 | 16 | 16/16 PASS | <15 min | ~5 min |
|
|
210
|
+
| R8 | 16 | 16/16 PASS | 4 min | 4 min |
|
|
211
|
+
| R9 | 16 | 16/16 PASS | 4 min | 4 min |
|
|
208
212
|
|
|
209
213
|
## Equipo
|
|
210
214
|
|
|
211
|
-
- **Líder QA**:
|
|
212
|
-
- **QA
|
|
213
|
-
-
|
|
215
|
+
- **Líder QA**: {nombre del líder del proyecto}
|
|
216
|
+
- **Equipo QA**: {integrantes del equipo}
|
|
217
|
+
- **Área**: {área o unidad organizacional}
|
|
214
218
|
|
|
215
219
|
## Capacitación
|
|
216
220
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Blazor E2E Helpers — Módulo reutilizable para specs
|
|
2
|
+
* Blazor E2E Helpers — Módulo reutilizable para specs Siesa ERP (Blazor Server)
|
|
3
3
|
* Siesa Business ERP (Blazor Server + DevExpress + Radzen + SignalR)
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* Patrones validados en
|
|
5
|
+
* Desarrollado y validado en múltiples proyectos Siesa.
|
|
6
|
+
* Patrones validados en múltiples módulos (191+ tests).
|
|
7
7
|
*
|
|
8
8
|
* Uso:
|
|
9
9
|
* import { createObsCollector, login, searchInGrid, ... } from './blazor-e2e-helpers';
|
|
@@ -120,7 +120,7 @@ export async function settle(page: Page, extraMs = 0) {
|
|
|
120
120
|
/**
|
|
121
121
|
* Selecciona la BD en el login si el combo está presente y `DB_ENGINE` está definido.
|
|
122
122
|
* Opt-in y best-effort: si no hay combo, `DB_ENGINE` no está, o algo falla, NO lanza
|
|
123
|
-
* y deja el login directo (comportamiento validado
|
|
123
|
+
* y deja el login directo (comportamiento validado).
|
|
124
124
|
* Soporta los dos mecanismos del ERP: DevExpress (SDKDropDownField) y <select> nativo.
|
|
125
125
|
*/
|
|
126
126
|
export async function selectDbIfPresent(page: Page, db?: string) {
|
|
@@ -151,12 +151,9 @@ export async function selectDbIfPresent(page: Page, db?: string) {
|
|
|
151
151
|
|
|
152
152
|
export async function login(page: Page, user?: string, pass?: string, db?: string) {
|
|
153
153
|
const cred = {
|
|
154
|
-
user: user || process.env.TEST_USER || '
|
|
155
|
-
password: pass || process.env.TEST_PASS || '
|
|
154
|
+
user: user || process.env.TEST_USER || (() => { throw new Error('TEST_USER no definido. Configura TEST_USER en .env'); })(),
|
|
155
|
+
password: pass || process.env.TEST_PASS || (() => { throw new Error('TEST_PASS no definido. Configura TEST_PASS en .env'); })(),
|
|
156
156
|
};
|
|
157
|
-
if (!user && !process.env.TEST_USER) {
|
|
158
|
-
console.warn('[blazor login] TEST_USER no definido — usando credencial demo "Carlos1". Define TEST_USER/TEST_PASS en .env para tu entorno.');
|
|
159
|
-
}
|
|
160
157
|
await page.goto('/login');
|
|
161
158
|
// Opt-in: solo selecciona BD si DB_ENGINE está definido y el combo existe (si no, login directo).
|
|
162
159
|
await selectDbIfPresent(page, db);
|
|
@@ -59,7 +59,7 @@ export default defineConfig({
|
|
|
59
59
|
}],
|
|
60
60
|
],
|
|
61
61
|
use: {
|
|
62
|
-
baseURL: process.env.BASE_URL || '
|
|
62
|
+
baseURL: process.env.BASE_URL || (() => { console.warn('BASE_URL no definida en .env'); return 'http://localhost:5000'; })(),
|
|
63
63
|
// CI corre en runners Linux sin display → headless obligatorio.
|
|
64
64
|
headless: !!process.env.CI,
|
|
65
65
|
viewport: null,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* AGILETEST_CLIENT_ID, AGILETEST_CLIENT_SECRET
|
|
9
9
|
* AGILETEST_EXECUTION_ID — ID interno de la ejecución (ej: 115230)
|
|
10
10
|
* AGILETEST_TC_ID — ID interno del test case (ej: 1531352)
|
|
11
|
-
* AGILETEST_PROJECT_ID — ID del proyecto Jira (default
|
|
11
|
+
* AGILETEST_PROJECT_ID — ID del proyecto Jira (requerido, sin default)
|
|
12
12
|
* AGILETEST_TOTAL_STEPS — Total de pasos del TC (default: 17)
|
|
13
13
|
* Si se ejecutan menos, el TC queda "In Progress"
|
|
14
14
|
*/
|
|
@@ -23,15 +23,16 @@ import type {
|
|
|
23
23
|
|
|
24
24
|
const AGILETEST_BASE = 'https://jira.agiletest.app';
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
// Status IDs de AgileTest — cada proyecto Jira tiene IDs diferentes.
|
|
27
|
+
// Configurar en .env si difieren de los defaults.
|
|
27
28
|
const STATUS_IDS = {
|
|
28
|
-
todo: 15016,
|
|
29
|
-
pass: 15017,
|
|
30
|
-
fail: 15018,
|
|
31
|
-
blocked: 15019,
|
|
32
|
-
inProgress: 15020,
|
|
33
|
-
skipped: 15021,
|
|
34
|
-
retest: 15022,
|
|
29
|
+
todo: Number(process.env.AT_STATUS_TODO || 15016),
|
|
30
|
+
pass: Number(process.env.AT_STATUS_PASS || 15017),
|
|
31
|
+
fail: Number(process.env.AT_STATUS_FAIL || 15018),
|
|
32
|
+
blocked: Number(process.env.AT_STATUS_BLOCKED || 15019),
|
|
33
|
+
inProgress: Number(process.env.AT_STATUS_INPROGRESS || 15020),
|
|
34
|
+
skipped: Number(process.env.AT_STATUS_SKIPPED || 15021),
|
|
35
|
+
retest: Number(process.env.AT_STATUS_RETEST || 15022),
|
|
35
36
|
} as const;
|
|
36
37
|
|
|
37
38
|
interface StepResult {
|
|
@@ -66,7 +67,7 @@ function readConfig(): AgileTestConfig | null {
|
|
|
66
67
|
clientSecret,
|
|
67
68
|
executionId,
|
|
68
69
|
tcId,
|
|
69
|
-
projectId: process.env.AGILETEST_PROJECT_ID || '
|
|
70
|
+
projectId: process.env.AGILETEST_PROJECT_ID || (() => { console.warn('AGILETEST_PROJECT_ID no definido'); return ''; })(),
|
|
70
71
|
totalSteps: parseInt(process.env.AGILETEST_TOTAL_STEPS || '17', 10),
|
|
71
72
|
};
|
|
72
73
|
}
|
|
@@ -76,9 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
| Aplicación | Stack | URL base | Auth |
|
|
78
78
|
|-----------|-------|----------|------|
|
|
79
|
-
|
|
|
80
|
-
| ERP HCM | Blazor + DevExpress + SDK UI Kit | beta-aws.siesadev.com | MasterCrud + SSO |
|
|
81
|
-
| Encuestas | Blazor + DevExpress + SDK UI Kit | beta-aws.siesadev.com | SSO |
|
|
79
|
+
| ERP Siesa | Blazor + DevExpress + SDK UI Kit | {BASE_URL} | MasterCrud + SSO |
|
|
82
80
|
| Financiero | React 18 + siesa-ui-kit + .NET 8 | qa.finance.siesa.dev/app | SSO |
|
|
83
81
|
|
|
84
82
|
> **Patrones transferibles:** entity field, SDKSelectField, SDKCharField, TopBarButton,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* seed-
|
|
2
|
+
* seed-example.spec.ts — Seed file para Playwright Test Agents (Siesa ERP)
|
|
3
3
|
*
|
|
4
4
|
* Establece el contexto de navegacion: Login ERP + seleccion de BD
|
|
5
5
|
* Usado como referencia por los agentes Planner/Generator/Healer
|
|
6
6
|
*
|
|
7
|
-
* Ambiente por
|
|
7
|
+
* Ambiente: definido por BASE_URL en .env (baseURL del playwright.config.ts)
|
|
8
8
|
* Credenciales y BD se toman de .env (ver .env.example): TEST_USER / TEST_PASS / DB_ENGINE
|
|
9
9
|
*/
|
|
10
10
|
import { test, expect } from '@playwright/test';
|
|
11
11
|
|
|
12
12
|
// ─── Credenciales via env vars (alineadas con .env.example) ────────────────────
|
|
13
13
|
const CRED = {
|
|
14
|
-
user: process.env.TEST_USER ?? '
|
|
15
|
-
pass: process.env.TEST_PASS ?? '
|
|
14
|
+
user: process.env.TEST_USER ?? '',
|
|
15
|
+
pass: process.env.TEST_PASS ?? '',
|
|
16
16
|
bd: process.env.DB_ENGINE ?? 'sqlserver',
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
test.describe('
|
|
19
|
+
test.describe('Siesa ERP — Seed', () => {
|
|
20
20
|
test('login ERP + verificar dashboard', async ({ page }) => {
|
|
21
21
|
// 1. Navegar al login
|
|
22
22
|
await page.goto('/login');
|
|
@@ -32,15 +32,15 @@ import * as path from 'path';
|
|
|
32
32
|
dotenvConfig({ path: path.join(__dirname, '..', '.env') });
|
|
33
33
|
|
|
34
34
|
const CRED = {
|
|
35
|
-
user: process.env.TEST_USER || '
|
|
36
|
-
password: process.env.TEST_PASS || '
|
|
35
|
+
user: process.env.TEST_USER || '',
|
|
36
|
+
password: process.env.TEST_PASS || '',
|
|
37
37
|
dbEngine: process.env.DB_ENGINE || 'sqlserver',
|
|
38
38
|
};
|
|
39
39
|
const OUTPUT_DIR = path.join(__dirname, '..', 'captured-locators');
|
|
40
40
|
const SCREENSHOTS_DIR = path.join(OUTPUT_DIR, 'screenshots'); // v4: visual baseline
|
|
41
41
|
const MODULES_DIR = path.join(OUTPUT_DIR, 'modules'); // v4: modulos reutilizables
|
|
42
42
|
|
|
43
|
-
// ─── Login
|
|
43
|
+
// ─── Login ERP (reutilizable por cualquier modulo) ──────────────────────
|
|
44
44
|
async function login(page: Page) {
|
|
45
45
|
await page.goto('/login');
|
|
46
46
|
await page.waitForLoadState('networkidle').catch(() => {});
|
|
@@ -148,7 +148,7 @@ function generatePlaywrightTS(captures: any[]): {
|
|
|
148
148
|
captures.forEach((c: any) => {
|
|
149
149
|
let base = '';
|
|
150
150
|
if (c.autoId) {
|
|
151
|
-
// Quitar prefijo SDK:
|
|
151
|
+
// Quitar prefijo SDK: SDKCharField_BLMiModulo.Campo → BLMiModulo_Campo
|
|
152
152
|
base = c.autoId
|
|
153
153
|
.replace(
|
|
154
154
|
/^SDK(CharField|NumericField|Button|DateField|ComboBox|CheckBox|Grid|DataGrid|Dialog|TreeView|RadioGroup|Toolbar|DropDown|ListBox|Tab|Panel|Switch|Menu|Popup|Upload)_/,
|