dify/e2e/features/agent-v2/support/test-materials.ts
yyh d0ea5a5e0d
chore(agent-v2): sync changes (#38442)
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: zyssyz123 <916125788@qq.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: 林玮 (Jade Lin) <linw1995@icloud.com>
Co-authored-by: 盐粒 Yanli <mail@yanli.one>
2026-07-06 13:51:33 +00:00

40 lines
1.4 KiB
TypeScript

import { getGeneratedTextMaterialPath, getTestMaterialPath } from '../../../support/test-materials'
export const agentBuilderTestMaterials = {
smallFile: 'agent-small-file.txt',
knowledgeSource: 'agent-knowledge-source.txt',
emptyFile: 'agent-empty-file.txt',
unsupportedFile: 'agent-unsupported-file.exe',
specialFilename: 'agent-special-filename-中文 @#$%.txt',
validEnv: 'agent-valid.env',
invalidEnv: 'agent-invalid.env',
buildInstruction: 'agent-build-instruction.txt',
summarySkill: 'e2e-summary-skill/SKILL.md',
countBatch5: 'count_batch_5_valid_files',
countBatch6: 'count_batch_6_valid_files',
countTotal50: 'count_total_50_valid_files',
countTotalExtra1: 'count_total_extra_1_valid_file',
} as const
export const agentBuilderGeneratedTestMaterials = {
slowUploadFile: 'agent-slow-upload-file.txt',
tooLargeFile: 'agent-too-large-file.txt',
} as const
export const getAgentBuilderTestMaterialPath = (material: keyof typeof agentBuilderTestMaterials) =>
getTestMaterialPath(agentBuilderTestMaterials[material])
export const getTooLargeAgentFilePath = () =>
getGeneratedTextMaterialPath({
fileName: 'agent-too-large-file.txt',
sizeBytes: 16 * 1024 * 1024,
seedText: 'E2E_TOO_LARGE_FILE_FIXTURE',
})
export const getSlowUploadAgentFilePath = () =>
getGeneratedTextMaterialPath({
fileName: 'agent-slow-upload-file.txt',
sizeBytes: 2 * 1024 * 1024,
seedText: 'E2E_SLOW_UPLOAD_FILE_FIXTURE',
})