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

fix: mochawesome helper with unique screenshots #4959

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

Lando1n
Copy link

@Lando1n Lando1n commented Apr 11, 2025

Motivation/Description of the PR

Screenshots started to fail to link when using the uniqueScreenshotName: true value on the Mochawesome helper.

This is due to the uuid suffix being added with a different method than before. Instead of re-implementing the same _getUUID function, it was moved into the testToFileName function with option unique.

Applicable helpers:

  • Playwright`
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium
  • TestCafe
  • Mochawesome

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@kobenguyent
Copy link
Collaborator

Could you please verify if the screenshot works correctly in reports? There was a previous issue with a broken screenshot link in reports, so it would be helpful to have a check. Thank you.

The fix was:
#4889

@Lando1n
Copy link
Author

Lando1n commented Apr 12, 2025

@kobenguyent - correct, it's now working for unique and non-unique screenshots.

Report:
image
With output directory like:
image

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