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

An error occurs if the test case name exceeds 255 bytes. #195

Open
koki-iwaizumi opened this issue Sep 11, 2024 · 0 comments
Open

An error occurs if the test case name exceeds 255 bytes. #195

koki-iwaizumi opened this issue Sep 11, 2024 · 0 comments

Comments

@koki-iwaizumi
Copy link

koki-iwaizumi commented Sep 11, 2024

Describe the bug
If the test case name in Playwright contains Japanese and exceeds 255 bytes, an error occurs in CI.

error example

Error: ENAMETOOLONG: name too long, open '/home/runner/work/foo-app/foo-app/frontend/apps/screen/test-results/chromatic-archives/archive/pages-foopage-components-foopanel-foomodal-foomodal-foomodal-createerror-ああああ-title-has-260-ああああ-exactly-i-know-ああああ-i-counted-and-that-is-too-big-for-a-file-sysfbe5.w1280h720.snapshot.json'

To Reproduce
Steps to reproduce the behavior:

  1. Run test in ubuntu(ci image)
  test('ああああ-title-has-260-ああああ-exactly-i-know-ああああ-i-counted-and-that-is-too-big-for-a-file-system-blah-blah-blah-blah-blah-blah-blah-blah-あああああ-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-blah-b-ok-this-right-here-this-is-the-あああああ', async ({
    page,
  }, testInfo) => {
  // test
  })
  1. An error occurs in CI
Error: ENAMETOOLONG: name too long, open '/home/runner/work/foo-app/foo-app/frontend/apps/screen/test-results/chromatic-archives/archive/pages-foopage-components-foopanel-foomodal-foomodal-foomodal-createerror-ああああ-title-has-260-ああああ-exactly-i-know-ああああ-i-counted-and-that-is-too-big-for-a-file-sysfbe5.w1280h720.snapshot.json'

Expected behavior
I want the string to be truncated if it exceeds 255 bytes.

Additional context
Please consider the byte overflow in the truncateFileName function.
https://github.com/chromaui/chromatic-e2e/pull/175/files#diff-f771838241ca868867569179ce55aec3a3aa5170e75c1f743947132a9a1d6f18R67-R86

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

No branches or pull requests

1 participant