codeceptjs / codeceptjs/CodeceptJS

keepTraceForPassedTests failure

Abierto
#5,433 3 comentarios 0 reacciones 0 asignados Ver en GitHub
stale
Lenguaje dominante
JavaScript
Estrellas
4.2k
Forks
757
Merge medio
2 d 9 h
PR fusionados (30 d)
16

Descripción

I try to use the config options `keepTraceForPassedTests` and `keepVideoForPassedTests`.

I use the [codeception](https://github.com/Codeception/module-playwright) module for php.

trace and video works. But when i try to activate one of the `keepTraceForPassedTests` and `keepVideoForPassedTests` options. it fails.

it use the playwright helper object. https://github.com/Codeception/module-playwright/blob/main/server.js#L37
```
playwright-1 | Init: {
playwright-1 | pw_debug: true,
playwright-1 | timeout: 5000,
playwright-1 | url: 'https://event-ticketing.local',
playwright-1 | browser: 'webkit',
playwright-1 | show: true,
playwright-1 | fullPageScreenshots: true,
playwright-1 | trace: true,
playwright-1 | video: true,
playwright-1 | ignoreHTTPSErrors: true,
playwright-1 | emulate: {
playwright-1 | userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1',
playwright-1 | viewport: { width: 375, height: 812 },
playwright-1 | deviceScaleFactor: 3,
playwright-1 | isMobile: true,
playwright-1 | hasTouch: true,
playwright-1 | defaultBrowserType: 'webkit'
playwright-1 | },
playwright-1 | keepVideoForPassedTests: true
playwright-1 | }
playwright-1 | Error saving screenshot: TypeError: Cannot read properties of undefined (reading 'screenshot')
playwright-1 | at Playwright.saveScreenshot (/usr/lib/node_modules/codeception-module-playwright/node_modules/codeceptjs/lib/helper/Playwright.js:2509:21)
playwright-1 | at /usr/lib/node_modules/codeception-module-playwright/server.js:69:28
playwright-1 | at Layer.handle [as handle_request] (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/layer.js:95:5)
playwright-1 | at next (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/route.js:149:13)
playwright-1 | at Route.dispatch (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/route.js:119:3)
playwright-1 | at Layer.handle [as handle_request] (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/layer.js:95:5)
playwright-1 | at /usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/index.js:284:15
playwright-1 | at router.process_params (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/index.js:346:12)
playwright-1 | at next (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/index.js:280:10)
playwright-1 | at /usr/lib/node_modules/codeception-module-playwright/node_modules/body-parser/lib/read.js:137:5
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza con server.js alrededor de la línea 37 y el helper de Playwright en Playwright.js:2509, usando la configuración indicada con keepVideoForPassedTests o keepTraceForPassedTests habilitado. Reproduce el fallo y sigue cómo las opciones para pruebas superadas afectan al estado del helper; se considera terminado cuando cualquiera de las dos opciones funciona sin el error de screenshot undefined y conserva el trace o el video solicitado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, playwright
Área
testing-qa
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
65/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.