simonsmith / cypress-image-snapshot

Catch visual regressions in Cypress with jest-image-snapshot
MIT License
65 stars 15 forks source link

Compatibility with Report Portal agent #66

Closed alexandrepasc closed 3 months ago

alexandrepasc commented 3 months ago

I was trying to use this package for visual tests in the application I'm working on. The project has implemented the Report Portal agent to have a centralized test report for all the company's applications.

Both this package and the RP Agent are listening to the after:screenshot event, and the agent uses it to send the screenshot taken to the execution log.

Since cypress-image-snapshot takes the screenshots to execute the comparison with the baseline, and deletes the file after the RP agent fails and lets the test execution pending.

I looked into the documentation and didn't find a way to set the package to not delete the screenshots, so the the agent could pick them. I propose to create a new not not-required option that would let us define the package to not delete the screenshot file from the screenshot folder.

name: isDeleteScreenshot default value: true

alexandrepasc commented 3 months ago

Well I have commits with the changes, but I can't push a new branch or commits to this repo @simonsmith .

simonsmith commented 3 months ago

can't push a new branch or commits to this repo

That's pretty normal, but I see you've opened a PR from your own fork now 👌🏻

alexandrepasc commented 3 months ago

But Will you accept this change?

simonsmith commented 3 months ago

It seems a reasonable change to me. Let me review the PR and get back to you

simonsmith commented 3 months ago

Merged with https://github.com/simonsmith/cypress-image-snapshot/pull/68