From a7b3afdff52cafbfc5b858ff93d066cd06cc2c7d Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Tue, 11 Aug 2020 23:28:34 +0530 Subject: [PATCH] fix: Add enable in_test flag for ui_tests --- frappe/commands/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index 28b6344b8e..b25aaa6b96 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -528,11 +528,11 @@ def run_tests(context, app=None, module=None, doctype=None, test=(), @pass_context def run_ui_tests(context, app, headless=False): "Run UI tests" - site = get_site(context) app_base_path = os.path.abspath(os.path.join(frappe.get_app_path(app), '..')) site_url = frappe.utils.get_site_url(site) admin_password = frappe.get_conf(site).admin_password + frappe.flags.in_test = True # override baseUrl using env variable site_env = 'CYPRESS_baseUrl={}'.format(site_url)