test: improve failure logging in E2E tests

This commit is contained in:
Carlos Santos 2025-05-14 12:10:38 +02:00
parent 8136547e6e
commit d2d3453f35
2 changed files with 4 additions and 2 deletions

View File

@ -37,7 +37,7 @@ jobs:
./prepare.sh ./prepare.sh
cd backend cd backend
npm install npm install
npm run start:prod > ../../backend.log 2>&1 & npm run start:prod > ../backend.log 2>&1 &
- name: Wait for OpenVidu Meet to Start - name: Wait for OpenVidu Meet to Start
run: wait-on --timeout 30000 http://localhost:6080/meet/health run: wait-on --timeout 30000 http://localhost:6080/meet/health
- name: Start testapp - name: Start testapp
@ -52,6 +52,8 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
ls -al backend/public ls -al backend/public
ls -al backend/public/webcomponent
cd frontend/webcomponent cd frontend/webcomponent
# Install Playwright browsers # Install Playwright browsers
mkdir -p /tmp/ms-playwright mkdir -p /tmp/ms-playwright

View File

@ -50,7 +50,7 @@ test.describe('Web Component E2E Tests', () => {
test.afterEach(async ({}, testInfo) => { test.afterEach(async ({}, testInfo) => {
if (testInfo.status !== testInfo.expectedStatus) { if (testInfo.status !== testInfo.expectedStatus) {
console.log(`Test falló: ${testInfo.title}`); console.error(`FAIL: ${testInfo.title}`);
// Take screenshot if the test fails // Take screenshot if the test fails
if (page && !page.isClosed()) { if (page && !page.isClosed()) {