-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Truncate file names for screenshots #2635
Conversation
f564b26
to
7b1f765
Compare
@@ -313,14 +314,24 @@ getPath = (data, ext, screenshotsFolder) -> | |||
else | |||
names = [data.titles.map(replaceInvalidChars).join(RUNNABLE_SEPARATOR)] | |||
|
|||
# truncate file names to be less than 220 characters | |||
# to accomodate filename size limits | |||
maxFileNameLength = 220 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit funky. From testing outside of Cypress, seems like this value should be 255 - length of (failed) (N).png
, but that still causes a name too long error on CI. That doesn't happen when this value is a bit smaller 🤷♀️
I think ideally we would not truncate ahead of time, but instead recover from thrown errors like I'm merging this in regardless, but in case we wanted to tighten up later we could. |
Opted to set a max length of 242 for the original string so it's 255 with
(failed).png