From aed98434554dbdcdfc120860eac7dda5aaf814bd Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Thu, 30 Oct 2025 23:18:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Failed=20to=20take=20screenshot:=20Error?= =?UTF-8?q?:=20ENAMETOOLONG:=20name=20too=20long,=20open=20'/home/runner/w?= =?UTF-8?q?ork/TidGi-Desktop/TidGi-Desktop/userData-test/logs/screenshots/?= =?UTF-8?q?Agent=20workflow=20-=20Create=20notes-=20update=20embeddings-?= =?UTF-8?q?=20then=20search/2025-10-30T11-46-28-891Z-I=20type=20-=E5=9C=A8?= =?UTF-8?q?=20wiki=20=E5=B7=A5=E4=BD=9C=E5=8C=BA=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=90=8D=E4=B8=BA=20AI=20Agent=20Guide=20?= =?UTF-8?q?=E7=9A=84=E7=AC=94=E8=AE=B0-=E5=86=85=E5=AE=B9=E6=98=AF-?= =?UTF-8?q?=E6=99=BA=E8=83=BD=E4=BD=93=E6=98=AF=E4=B8=80=E7=A7=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E6=89=A7=E8=A1=8C=E4=BB=BB=E5=8A=A1=E7=9A=84AI?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F-=E5=AE=83=E5=8F=AF=E4=BB=A5=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=B7=A5=E5=85=B7-=E6=90=9C=E7=B4=A2=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=B9=B6=E4=B8=8E=E7=94=A8=E6=88=B7=E4=BA=A4=E4=BA=92?= =?UTF-8?q?-=20in=20-chat=20input-=20element=20with=20selec-PASSED-page.pn?= =?UTF-8?q?g'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/stepDefinitions/application.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/features/stepDefinitions/application.ts b/features/stepDefinitions/application.ts index 299bf412..f478d7bf 100644 --- a/features/stepDefinitions/application.ts +++ b/features/stepDefinitions/application.ts @@ -222,10 +222,12 @@ AfterStep(async function(this: ApplicationWorld, { pickle, pickleStep, result }) } } - const scenarioName = pickle.name; - const cleanScenarioName = makeSlugPath(scenarioName); + const scenarioName = pickle.name; + // Limit scenario slug to avoid extremely long directory names + const cleanScenarioName = makeSlugPath(scenarioName, 60); - const cleanStepText = makeSlugPath(stepText, 120); + // Limit step text slug to avoid excessively long filenames which can trigger ENAMETOOLONG + const cleanStepText = makeSlugPath(stepText, 80); const stepStatus = result && typeof result.status === 'string' ? result.status : 'unknown-status'; const featureDirectory = path.resolve(screenshotsDirectory, cleanScenarioName);