You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Screenshot is not attached after waiting for element fails.
When test fails on cy.get(this.notificationPopupMessage).should('have.text', message);
In report I get (without screenshot)
Timed out retrying after 15000ms: Expected to find element: .ant-notification-notice-message, but never found it.
Screenshot is not attached - missing screenshot (attachment) in allure-results folder.
What I noticed - if I add .only to this test (it) then attachment is generated in allure-results and it is attached to report
I think I know when problem appears - I use 'cypress-plugin-snapshots'. When I have multiple it(), and in first it test fails on compare screenshot and then next it() fails eg. because cant find element then eg (Timed out retrying after 15000ms: Expected to find element: .ant-notification-notice-message, but never found it.) then screenshot is not in report.
When I change order of tests (first it fails because cannot find element) and second test fails on compare screenshots then all screenshots are attached to repord and exists in allure-results.
Do you know what is wrong?
The text was updated successfully, but these errors were encountered:
kamiloski88
changed the title
Screenshot is not attached after cypress-wait-until fails
Screenshot is not attached after waiting for element fails
Mar 7, 2022
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 without 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 meinaart/cypress-plugin-snapshots#210 there are already alternatives available.
Describe the bug
Screenshot is not attached after waiting for element fails.
When test fails on cy.get(this.notificationPopupMessage).should('have.text', message);
In report I get (without screenshot)
Timed out retrying after 15000ms: Expected to find element:
.ant-notification-notice-message
, but never found it.Screenshot is not attached - missing screenshot (attachment) in allure-results folder.
What I noticed - if I add .only to this test (it) then attachment is generated in allure-results and it is attached to report
I think I know when problem appears - I use 'cypress-plugin-snapshots'. When I have multiple it(), and in first it test fails on compare screenshot and then next it() fails eg. because cant find element then eg (Timed out retrying after 15000ms: Expected to find element:
.ant-notification-notice-message
, but never found it.) then screenshot is not in report.When I change order of tests (first it fails because cannot find element) and second test fails on compare screenshots then all screenshots are attached to repord and exists in allure-results.
Do you know what is wrong?
The text was updated successfully, but these errors were encountered: