2026-03-18
This release includes bug fixes and improvements to make the NPD Project Module tests more robust and reliable.
-
Fix: Implement robust test setup to prevent flaky tests (
0b0275b)- Created
test_setup.pywithbefore_tests()hook for ERPNext fixtures - Enabled
before_testshook inhooks.pyto run during test initialization - Updated
tests/utils.pyto handle ERPNext warehouse naming (company suffix) - Updated CI workflow to run ERPNext fixtures installer
- Resolves:
LinkValidationErrorwhen creating test warehouses due to missing "All Warehouses" root warehouse
- Created
-
Fix: Handle warehouse naming with company suffix (
ce0b8fd,b3ac8ec)- Fixed warehouse existence checks to handle ERPNext's company suffix pattern (e.g., "All Warehouses - _TC")
- Prevents duplicate entry errors during test runs
-
Fix: Add nosemgrep comment for frappe.db.commit() (
24927f7)- Added semgrep exclusion for manual database commit required to persist test fixtures
- Style: Fix ruff formatting in test_setup.py (
8d7f3f2) - Lint changes (
78589e5)
- Chore: Remove claude workflows and add AGENT.md (
3d78e06)- Removed claude-code-review.yml workflow
- Removed claude.yml workflow
- Added AGENT.md placeholder file
- Sequence change in NPD Template (
9a6c9f6) - Remove duplicate (
8c432e7) - Fix docname in test (
b3ac8ec) - Remove item name (
2df2c12) - Add warehouse fixture (
69c41e2)
- New
before_tests()hook ensures proper ERPNext fixtures are installed before tests run - Robust warehouse detection uses
LIKEqueries instead of exact name matches to handle company suffixes - CI workflow updated to run
erpnext.setup.setup_wizard.operations.install_fixtures.installduring setup
npd_project_module/utils/test_setup.py(new)npd_project_module/hooks.pynpd_project_module/tests/utils.py.github/workflows/ci.yml
Guru107