AvanzaCast/e2e/README-validate-flow.md
Cesar Mendivil 8b458a3ddf feat: add initial LiveKit Meet integration with utility scripts, configs, and core components
- Add Next.js app structure with base configs, linting, and formatting
- Implement LiveKit Meet page, types, and utility functions
- Add Docker, Compose, and deployment scripts for backend and token server
- Provide E2E and smoke test scaffolding with Puppeteer and Playwright helpers
- Include CSS modules and global styles for UI
- Add postMessage and studio integration utilities
- Update package.json with dependencies and scripts for development and testing
2025-11-20 12:50:38 -07:00

2.3 KiB

Validate Studio Flow (E2E)

Este helper ejecuta un script Puppeteer para validar el flujo desde Broadcast Panel -> Studio Portal usando un token pre-generado y LiveKit.

Archivos

  • e2e/validate-flow-domains-local.js - script que navega al broadcast panel y trata de abrir el portal del estudio con el token proporcionado.
  • e2e/test-pages/broadcast.html - página local de prueba con un enlace "Entrar al estudio" usada para validación sin red.
  • e2e/studio-flow-domains-result.json - resultado JSON generado por el script.
  • e2e/studio_flow_result.png - captura de pantalla generada durante la validación.

Cómo ejecutar localmente

  1. Instala dependencias (desde la raíz del repo o dentro de e2e):
cd /home/xesar/Documentos/Nextream/AvanzaCast/e2e
npm install --no-audit --no-fund
  1. Ejecutar la prueba contra una instancia real (requiere token y URLs):
cd /home/xesar/Documentos/Nextream/AvanzaCast/e2e
TOKEN="e2e098863b912f6a178b68e71ec3c58d" \
VITE_LIVEKIT_WS_URL="wss://livekit-server.example" \
VITE_TOKEN_SERVER_URL="https://token-server.example" \
VITE_BROADCASTPANEL_URL="https://broadcastpanel.example" \
VITE_STUDIO_URL="https://studio.example" \
node validate-flow-domains-local.js
  1. Ejecutar la prueba local (sin red) usando la página de prueba incluida:
cd /home/xesar/Documentos/Nextream/AvanzaCast/e2e
BROADCAST_URL="file:///home/xesar/Documentos/Nextream/AvanzaCast/e2e/test-pages/broadcast.html" \
TOKEN="testtoken123" \
STUDIO_URL="about:blank" \
node validate-flow-domains-local.js
  1. Artefactos resultantes
  • e2e/studio-flow-domains-result.json (JSON con logs y navegaciones)
  • e2e/studio_flow_result.png (captura de pantalla)

Cómo usar en CI / GitHub Actions

  • El repo incluye un workflow .github/workflows/validate-studio-flow.yml que puede dispararse manualmente (workflow_dispatch). Pasa los secretos/token como variables al workflow.

Qué compartir al equipo

  • Copiar y pegar e2e/studio-flow-domains-result.json
  • Subir e2e/studio_flow_result.png

Notas

  • El script intenta hacer click en elementos con texto similar a "Entrar al estudio" y abre la URL del estudio con el token como query param.
  • Si el click no abre el estudio, el script hace un fallback a navegar directamente a STUDIO_URL con el token.