* refactor: toml test records for readability
* fix: maintain backwards compatibility
* refactor: transform in-tree records
* chore: don't use deprecated functions (treewide)
* chore: revert migration of tests which depend on old test records list
* feat: add cls.globalTestRecords on IntegrationTestCase
* feat: set doctype on test classes
* refactor: Transform `make_test_records` into a generator
* feat: lazy create doctype records on first use
* perf: improve file walker
* fix: submission queue test
* refactor: improve logging a bit
* fix: global records install for app (semifix)
* refactor: constitute unit test case
* fix: docs and type hints
* refactor: mark presumed integration test cases explicitly
At time of writing, we now have at least two base test classes:
- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase
They load in their perspective priority queue during execution.
Probably more to come for more efficient queing and scheduling.
In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.
* feat: Move test-related functions from test_runner.py to tests/utils.py
* refactor: add bare UnitTestCase to all doctype tests
This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
* fix: Doctype Links not updating #26041https://github.com/frappe/frappe/issues/26041
In refresh_field(fieldname, txt) function of grid_row.js, added the comments :-
// the below if statement is added to factor in the exception when this.doc is undefined -
// - after row removals via customize_form.js on links, actions and states child-tables
if (this.doc)
field.docname = this.doc.name;
* fix: Doctype Links not updating frappe#26041
In customize_form.js :-
defined parent and parenttype as local variables in the event functions for child tables links, actions and states
* Revert "In customize_form.js :-"
This reverts commit 6732f0aec4733490da46d7bd5cbedf239d13ec89.
* fix: Doctype Links not updating #26041
* style: amended spacing as per 'prettier' in precommit
* style: added comma after last event definitions in child doctype, as per 'prettier' in precommit
(cherry picked from commit b9f48455be10b40ab53375d7aef9fbaac644aea6)
Co-authored-by: Karan Wilson <48678570+karanwilson@users.noreply.github.com>
The value changed is being checked directly
Checking the flag breaks if this or a similar test is run multiple times on the same database
Also extract 255 into a separate variable
Signed-off-by: Akhil Narang <me@akhilnarang.dev>