Closed lsonduong closed 2 years ago
The problem with cypress-plugin-snapshots
is that it overrides onAfterScreenshot
config not taking into account that there could be other listeners for such event in Cypress.
From cypress-allure-reporter side we already are using separate logic from onAfterScreenshot
to handle attachments and this should not be an issue.
Moreover while checking sources I have also noted that latest update for cypress-plugin-snapshots
was on 11 Aug 2020, it is based on cypress v4.5.0 and a lot of things have changed dramatically since that time.
Also, there are a lot of issues doubting that plugin is maintained, according to issue https://github.com/meinaart/cypress-plugin-snapshots/issues/210 there are already alternatives available.
Describe the bug
This is a totally different issue from #15
It's not the snapshots that were captured by cypress-snapshot-plugins not getting attached, we can careless about that (there is already a sample for that). It is the problem when the test has ".toMatchImageSnapshot()", the whole allure report of that test will not have any screenshots or video attached no matter if it passed ("allureAddVideoOnPass"=true) or failed (even when snapshots match).
To Reproduce
cy.document().toMatchImageSnapshot();
Expected behavior Video and on-failure snapshots should be added, but it does not. (we can safely ignore all snapshots created by cypress-snapshot-plugins).
Environment (please complete the following information):