From 4010add64cb138499dcff0af79d2c49fbf26c077 Mon Sep 17 00:00:00 2001 From: anandbaburajan Date: Thu, 20 Jul 2023 14:46:26 +0530 Subject: [PATCH] chore: add module arg in create_dashboard_py_for_doctype (cherry picked from commit 5816b15aed68a5f2062ad4d119425f7c10c6062c) --- cypress/integration/dashboard_links.js | 1 + frappe/tests/ui_test_helpers.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cypress/integration/dashboard_links.js b/cypress/integration/dashboard_links.js index b3cb8a540b..4c9fbc65e1 100644 --- a/cypress/integration/dashboard_links.js +++ b/cypress/integration/dashboard_links.js @@ -54,6 +54,7 @@ context("Dashboard links", () => { "frappe.tests.ui_test_helpers.create_dashboard_py_for_doctype", { name: doctype_a_with_child_table_with_link_to_doctype_b_name, + module: "custom", dashboard: doctype_a_with_child_table_with_link_to_doctype_b_dashboard, } diff --git a/frappe/tests/ui_test_helpers.py b/frappe/tests/ui_test_helpers.py index f25c0e42f5..a6c750e511 100644 --- a/frappe/tests/ui_test_helpers.py +++ b/frappe/tests/ui_test_helpers.py @@ -321,11 +321,12 @@ def update_child_table(name, doctype_to_link_name=None, doctype_to_link_fieldnam @whitelist_for_tests -def create_dashboard_py_for_doctype(name, dashboard): +def create_dashboard_py_for_doctype(name, module, dashboard): scrubbed_name = scrub(name) target_file = os.path.join( frappe.get_pymodule_path("frappe"), - "custom/doctype", + module, + "doctype", scrubbed_name, scrubbed_name + "_dashboard.py", )