Bug
With retry enabled every failed test ends up with empty test.artifacts — screenshot/video are lost, reporters get nothing to upload.
Console shows TypeError: originalTest.artifacts is not iterable for each retried test.
Root cause
lib/listener/retryEnhancer.js copies artifacts with array spread [...originalTest.artifacts], but artifacts is an object map ({screenshot: path}). The spread throws, copyCodeceptJSProperties aborts mid-loop and the retried test never gets enhanceMochaTest() — so the retried attempt can't record artifacts either.
screencast plugin's ensureArtifactsObject() replaces array-shaped artifacts with {}, dropping the screenshot key already written by the screenshot plugin.
Repro
4.0.8 and 4.1.0: Playwright helper + plugins screenshot and screencast (on=fail) + retry: 1. Any failing test → TypeError in console, no screenshot saved, empty artifacts in report.
Bug
With
retryenabled every failed test ends up with emptytest.artifacts— screenshot/video are lost, reporters get nothing to upload.Console shows
TypeError: originalTest.artifacts is not iterablefor each retried test.Root cause
lib/listener/retryEnhancer.jscopies artifacts with array spread[...originalTest.artifacts], but artifacts is an object map ({screenshot: path}). The spread throws,copyCodeceptJSPropertiesaborts mid-loop and the retried test never getsenhanceMochaTest()— so the retried attempt can't record artifacts either.screencastplugin'sensureArtifactsObject()replaces array-shaped artifacts with{}, dropping thescreenshotkey already written by the screenshot plugin.Repro
4.0.8 and 4.1.0: Playwright helper + plugins
screenshotandscreencast(on=fail) +retry: 1. Any failing test → TypeError in console, no screenshot saved, empty artifacts in report.