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

feat: add method to retrieve file attachments for failed tests #721

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

gibiw
Copy link
Contributor

@gibiw gibiw commented Dec 6, 2024

#719
This pull request includes several changes to the cypress-qase-reporter package, focusing on fixing issues with screenshot uploads, updating the package version, and refactoring the code to improve functionality and maintainability.

Bug Fixes:

  • Fixed an issue with screenshots not being uploaded to Qase for failed tests. (qase-cypress/changelog.md, qase-cypress/src/reporter.ts) [1] [2]

Version Update:

  • Updated the package version from 2.2.3 to 2.2.4 in package.json. (qase-cypress/package.json)

Code Refactoring:

  • Added a new FileSearcher class to handle file searching operations, replacing the old traverseDir function. (qase-cypress/src/fileSearcher.ts, qase-cypress/src/reporter.ts) [1] [2]
  • Removed the findAttachments method and replaced its functionality with the new FileSearcher class. (qase-cypress/src/reporter.ts)
  • Added a getTestFileName method to extract the file name from a test suite. (qase-cypress/src/reporter.ts)

Event Handling:

  • Added an event listener for EVENT_TEST_BEGIN to record the start time of each test. (qase-cypress/src/reporter.ts) [1] [2]

Implemented a utility method to search for files created after a specified timestamp within a given folder. This is used in the reporter to gather a list of attachments for failed test cases.
@gibiw gibiw enabled auto-merge (rebase) December 6, 2024 12:49
@apetrosyan1613 apetrosyan1613 self-requested a review December 6, 2024 12:49
@gibiw gibiw merged commit 1e978f9 into main Dec 6, 2024
41 checks passed
@gibiw gibiw deleted the fix/cypress branch December 6, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants