Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshot from cy.screenshot() generated to allure-result got error #96

Closed
lct005 opened this issue Sep 28, 2021 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@lct005
Copy link

lct005 commented Sep 28, 2021

Describe the bug
cy.screenshot() captured screenshot successfully but when generated to allure-result, it got error (with size of 1KB).
image

The API function cy.allure().fileAttachment() worked well with same screenshot taken from cy.screenshot() (from path 'cypress/screenshots/specs/fileImg.png')
image

To Reproduce
Steps to reproduce the behavior:

  1. Use cy.screenshot() to capture and automatically attach to report
  2. Use cy.screenshot() to capture, get screenshot path, and attach to report with cy.allure().fileAttachment()

Expected behavior
Screenshot taken from cy.screenshot() should be generated successfully to allure-result and able to see in report view

Environment (please complete the following information):

  • Cypress version: 8.4.1
  • OS: Windows 10
  • Cypress Allure Plugin version: 2.18.0
  • Allure CLI: 2.13.8
@lct005 lct005 added the bug Something isn't working label Sep 28, 2021
Shelex added a commit that referenced this issue Nov 22, 2021
…ress #96, #101

feat: support nested mocha suites and properly handle error in hooks, address #99

feat: use cypress after:spec api to create sample suite and test with error, address #98
@Shelex
Copy link
Owner

Shelex commented Nov 22, 2021

Hi @lct005
Thank you for reporting this.

I could not exactly reproduce it, but anyway in v2.22.0 I have reworked attachments and it should be much reliable as utilize cypress after:spec event which now provides paths of screenshots. Could you please check it on your end?

@Shelex Shelex closed this as completed Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants