Skip to content

Conversation

@mirao
Copy link
Contributor

@mirao mirao commented Nov 11, 2025

Motivation/Description of the PR

Fixed by Copilot Claude Sonnet 4.
I checked that the unit test should generate unique screenshot names for Data() iterations with uniqueScreenshotNames: true failed as expected before the fix.

  • Fix timestamp precision from seconds to milliseconds in testToFileName
  • Move unique suffix application after data part removal to preserve uniqueness
  • Add comprehensive unit tests for Data() scenario collision prevention
  • Ensure each Data() iteration gets unique screenshot filename instead of overwriting

Resolves issue where Data() test iterations were overwriting screenshots with identical filenames when uniqueScreenshotNames: true was enabled.

Applicable helpers:

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

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)

…hotNames

- Fix timestamp precision from seconds to milliseconds in testToFileName
- Move unique suffix application after data part removal to preserve uniqueness
- Add comprehensive unit tests for Data() scenario collision prevention
- Ensure each Data() iteration gets unique screenshot filename instead of overwriting

Resolves issue where Data() test iterations were overwriting screenshots with
identical filenames when uniqueScreenshotNames: true was enabled.

Fixes codeceptjs#5298
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.

Plugin: screenshotOnFail: Data driven scenarios ignore the setting "uniqueScreenshotNames: true"

1 participant