Commit Graph

7 Commits

Author SHA1 Message Date
CodingOnStar
e2edcdb0cf fix(tests): normalize path handling in useDocLink mock for document processing tests
- Updated the mock implementation of useDocLink to strip leading slashes from paths, aligning with actual implementation behavior.
- This change ensures that the generated documentation URLs are consistent and accurate, improving the reliability of tests that depend on this mock.

These adjustments enhance the overall stability and correctness of the testing suite for document processing components.
2025-12-19 13:46:11 +08:00
yyh
d0ba785645 Merge branch 'main' into test/datasets-documents-pipeline 2025-12-19 12:21:50 +08:00
Stephen Zhou
a26881cb24 refactor: unified cn utils (#29916)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2025-12-19 12:08:34 +08:00
CodingOnStar
dae130d8d2 refactor(tests): improve mock document creation and enhance test stability
- Updated the  function to use a deterministic counter for IDs, reducing flakiness in tests.
- Ensured the ID counter resets before each test to maintain reproducibility.
- Adjusted assertions in the  tests to explicitly check for error handling when the documents array is empty, improving clarity and reliability of edge case testing.
- Fixed a link in the  tests to ensure it points to the correct documentation URL.

These changes enhance the robustness and reliability of the testing suite for document processing components.
2025-12-18 18:50:21 +08:00
CodingOnStar
bd9402c90b feat(tests): add comprehensive tests for Processing and EmbeddingProcess components
- Introduced new test files for Processing and EmbeddingProcess components, covering rendering, props variations, edge cases, and memoization.
- Added mock implementations for external dependencies to facilitate testing.
- Enhanced Jest configuration to handle module resolution for lodash and ky.
- Created a mock for the ky HTTP client to avoid ESM issues in Jest tests.
- Updated Processing component to handle optional chaining for retrieval method.

This commit significantly improves test coverage and stability for the document processing features.
2025-12-18 17:10:51 +08:00
Wu Tianwei
a39b185627 fix: comment out unused segmentation rule properties in RuleDetail component (#26031)
Some checks are pending
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Waiting to run
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Waiting to run
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Blocked by required conditions
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Blocked by required conditions
Main CI Pipeline / Check Changed Files (push) Waiting to run
Main CI Pipeline / API Tests (push) Blocked by required conditions
Main CI Pipeline / Web Tests (push) Blocked by required conditions
Main CI Pipeline / Style Check (push) Waiting to run
Main CI Pipeline / VDB Tests (push) Blocked by required conditions
Main CI Pipeline / DB Migration Test (push) Blocked by required conditions
2025-09-22 14:17:02 +08:00
-LAN-
85cda47c70 feat: knowledge pipeline (#25360)
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: twwu <twwu@dify.ai>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: jyong <718720800@qq.com>
Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com>
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
Co-authored-by: lyzno1 <yuanyouhuilyz@gmail.com>
Co-authored-by: quicksand <quicksandzn@gmail.com>
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com>
Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nite-knite <nkCoding@gmail.com>
Co-authored-by: Hanqing Zhao <sherry9277@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Harry <xh001x@hotmail.com>
2025-09-18 12:49:10 +08:00