Skip to content

test: add the version-16 python, javascript and e2e suite - #78

Merged
aakvatech merged 45 commits into
Aakvatech-Limited:version-16-hotfixfrom
av-dev2:test/propms-v16-suite
Sep 4, 2026
Merged

test: add the version-16 python, javascript and e2e suite#78
aakvatech merged 45 commits into
Aakvatech-Limited:version-16-hotfixfrom
av-dev2:test/propms-v16-suite

Conversation

@av-dev2

@av-dev2 av-dev2 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

propms had no runnable tests: propms/tests/ held only an __init__.py that set
frappe.flags.skip_test_records, a flag Frappe 16 no longer reads, and the 27
test_*.js files under doctype/ were QUnit scaffolds for a runner Frappe
removed several versions ago. This PR replaces both with a suite that runs.

Python: 120 tests

The Frappe test runner, pointed at a dedicated -test.localhost site.

Module Covers
test_hooks every doc_events, scheduler_events, after_install, after_migrate and before_tests target resolves; every doctype_js / page_js asset exists and its DocType or Page exists
test_v16_compat no frappe.db.commit() reachable from a document hook, no /app routes, no deprecated v15 test flags, the version string, get_all default ordering, expression filters, InnoDB
test_lease the status rules as pure functions, plus insert, manual statuses, the active-lease limit, the daily scheduler and renewal
test_property nesting, the status guard against active leases, the tree endpoints
test_property_increment the rounding and increment arithmetic, every validation branch, and the engine end to end
test_invoice_schedule month arithmetic, schedule generation, advance days, parent linkage, the monthly scheduler
test_lease_invoice invoice creation, due dates, cost centres, the empty-schedule path and the daily batch
test_issue_hook maintenance job card billing: single, grouped, no customer, missing tax template, closing rules
test_auto_custom date helpers, lease lookups, keyset status, meter readings, the property status schedulers
test_pos, test_install the POS lease lookup, and that the custom field and property setter builders are idempotent
test_reports all 21 shipped reports load, import and execute
test_doctype_schema, test_doctype_controllers all 45 DocType JSONs: link targets, engines, naming series; every controller imports, constructs and lists

propms/tests/utils.py holds the bootstrap (before_tests, registered in
hooks.py) and the factories. It completes setup for _Test Property Company
in TZS and builds properties, leases, items and customers on demand.

Statement coverage of the propms package is 62.1% (2016 statements, 1252
covered).

JavaScript: 271 tests

npm install && npm test, vitest on jsdom, no bench required. Client scripts
run against a mocked desk global (frappe.ui.form.on, frappe.call,
frappe.require, erpnext.PointOfSale), wrapped in an IIFE the way version 16
evaluates report and page scripts.

  • every shipped script parses, runs, and is checked for /app routes, the
    removed offline POS API and interpolated __() calls;
  • behaviour tests for the Lease form (queries, the Actions and View buttons, the
    renewal banner), the POS cost centre control, and the Company, Sales Invoice
    and Property tree scripts.

Statement coverage of the shipped .js files is 61.6%.

End to end: 12 tests

propms/tests/e2e/, skipped unless PROPMS_E2E_BASE_URL is set.

  • test_rest_api.py drives the REST surface with requests: resources,
    whitelisted methods, a query report over HTTP, and the version-16 rule that
    logout is POST-only.
  • test_desk_ui.py drives Chrome with Playwright over all 27 desk surfaces and
    fails on any console error.

Also here

  • the 27 QUnit scaffolds are deleted; they cannot run, and they produced 63 of
    the app's semgrep cur_frm warnings;
  • package.json, package-lock.json and vitest.config.js for the JS harness,
    with node_modules/ and coverage/ ignored. No CI workflow is added: tests
    stay local, per the app's CI policy.

Depends on #77.

av-dev2 added 30 commits August 27, 2026 13:14
av-dev2 and others added 15 commits August 27, 2026 13:15
# Conflicts:
#	.gitignore
#	propms/__init__.py
#	propms/auto_custom.py
#	propms/hooks.py
#	propms/issue_hook.py
#	propms/lease_invoice.py
#	propms/lease_invoice_schedule.py
#	propms/pos.js
#	propms/property_management_solution/doctype/lease/lease.py
#	propms/property_management_solution/doctype/property/property.py
#	propms/property_management_solution/report/invoice_details/other_methods.py
#	propms/property_management_solution/report/mis_income_break_up/other_methods.py
#	propms/property_management_solution/report/rent_invoices_details/rent_invoices_details.py
#	propms/property_management_solution/report/rent_invoices_details_usd/rent_invoices_details_usd.py
#	propms/property_management_solution/report/subscription_service_report/subscription_service_report.js
#	propms/property_management_solution/report/utility_invoices/other_methods.py
#	pyproject.toml
@aakvatech
aakvatech merged commit 4a146f1 into Aakvatech-Limited:version-16-hotfix Sep 4, 2026
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants