Open alesya-la opened 1 month ago
Hello I have next error when there is a retry for test and parameter reportHooks:truein reporter configuration. Note: it is reproduced when test has hook
reportHooks:true
Code to reproduce: configs/config.js
const {defineConfig} = require('cypress'); const registerReportPortalPlugin = require('@reportportal/agent-js-cypress/lib/plugin'); module.exports = defineConfig({ e2e: { setupNodeEvents(on, config) { // implement node event listeners here registerReportPortalPlugin(on, config); return config; }, retries: { runMode: 1, openMode: 0 } }, })
configs/reporters.config
const {defineConfig} = require('cypress'); module.exports = { reporterEnabled: "@reportportal/agent-js-cypress", reportportalAgentJsCypressReporterOptions: { endpoint: "END_POINT", apiKey: 'API_KEY', launch: 'LAUNCH_NAME', project: 'PROJECT_NAME', description: 'RP_DESCRIPTION', autoMerge: true, skippedIssue: false, reportHooks: true, integrationFolder: "cypress/e2e", attributes: [ { key:"build", value: 'RP_BUILD', }, ], } }
cypress/e2e/test.cy.js
describe('Test', () => { beforeEach('Login to project page', () => { cy.visit('https://www.google.com/'); }); it('test', () => { cy.get('#lnXdpd').should('exist'); cy.get('#lnXdpd').not('exist'); }) });
package.json
{ "devDependencies": { "@reportportal/agent-js-cypress": "^5.3.0", "cypress": "^13.11.0" }, "dependencies": { "cypress-multi-reporters": "^1.6.4" } }
@AmsterGet , could you please check?
same error here. The workaround is to set reportHooks to false and then it's not crashing anymore.
reportHooks
false
Hello I have next error when there is a retry for test and parameter![image](https://github.com/reportportal/agent-js-cypress/assets/172751044/d85b7d82-a18e-4008-beba-d5f8430baf75)
reportHooks:true
in reporter configuration. Note: it is reproduced when test has hookCode to reproduce: configs/config.js
configs/reporters.config
cypress/e2e/test.cy.js
package.json