diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 665e7b6c10..ffc9cf6b73 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -101,6 +101,7 @@ jobs: ${{ runner.os }}-yarn- - name: Cache cypress binary + if: matrix.TYPE == 'ui' uses: actions/cache@v2 with: path: ~/.cache diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index c103ad7e4a..de80d47497 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -863,8 +863,8 @@ def reset_password(user): @frappe.whitelist() @frappe.validate_and_sanitize_search_inputs def user_query(doctype, txt, searchfield, start, page_len, filters): - from frappe.desk.reportview import get_match_cond - + from frappe.desk.reportview import get_match_cond, get_filters_cond + conditions=[] user_type_condition = "and user_type = 'System User'" if filters and filters.get('ignore_user_type'): user_type_condition = '' @@ -878,17 +878,22 @@ def user_query(doctype, txt, searchfield, start, page_len, filters): AND `name` NOT IN ({standard_users}) AND ({key} LIKE %(txt)s OR CONCAT_WS(' ', first_name, middle_name, last_name) LIKE %(txt)s) - {mcond} + {fcond} {mcond} ORDER BY CASE WHEN `name` LIKE %(txt)s THEN 0 ELSE 1 END, CASE WHEN concat_ws(' ', first_name, middle_name, last_name) LIKE %(txt)s THEN 0 ELSE 1 END, NAME asc - LIMIT %(page_len)s OFFSET %(start)s""".format( + LIMIT %(page_len)s OFFSET %(start)s + """.format( user_type_condition = user_type_condition, standard_users=", ".join([frappe.db.escape(u) for u in STANDARD_USERS]), - key=searchfield, mcond=get_match_cond(doctype)), - dict(start=start, page_len=page_len, txt=txt)) + key=searchfield, + fcond=get_filters_cond(doctype, filters, conditions), + mcond=get_match_cond(doctype) + ), + dict(start=start, page_len=page_len, txt=txt) + ) def get_total_users(): """Returns total no. of system users""" diff --git a/frappe/utils/__init__.py b/frappe/utils/__init__.py index 728028622b..55bc574b8e 100644 --- a/frappe/utils/__init__.py +++ b/frappe/utils/__init__.py @@ -403,6 +403,14 @@ def call_hook_method(hook, *args, **kwargs): return out def update_progress_bar(txt, i, l): + if os.environ.get("CI"): + if i == 0: + sys.stdout.write(txt) + + sys.stdout.write(".") + sys.stdout.flush() + return + if not getattr(frappe.local, 'request', None): lt = len(txt) try: diff --git a/frappe/website/doctype/blog_post/test_blog_post.py b/frappe/website/doctype/blog_post/test_blog_post.py index cdf53122b2..f0fc484a31 100644 --- a/frappe/website/doctype/blog_post/test_blog_post.py +++ b/frappe/website/doctype/blog_post/test_blog_post.py @@ -11,8 +11,12 @@ from frappe.website.render import render from frappe.utils import random_string from frappe.website.doctype.blog_post.blog_post import get_blog_list from frappe.website.website_generator import WebsiteGenerator +from frappe.custom.doctype.customize_form.customize_form import reset_customization class TestBlogPost(unittest.TestCase): + def setUp(self): + reset_customization('Blog Post') + def test_generator_view(self): pages = frappe.get_all('Blog Post', fields=['name', 'route'], filters={'published': 1, 'route': ('!=', '')}, limit =1) @@ -97,6 +101,7 @@ def make_test_blog(category_title="Test Blog Category"): doctype = 'Blogger', short_name='test-blogger', full_name='Test Blogger')).insert() + test_blog = frappe.get_doc(dict( doctype = 'Blog Post', blog_category = category_name, diff --git a/package.json b/package.json index 40bed18cb7..55f3a6a443 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "driver.js": "^0.9.8", "express": "^4.17.1", "fast-deep-equal": "^2.0.1", - "frappe-charts": "^2.0.0-rc10", + "frappe-charts": "^2.0.0-rc11", "frappe-datatable": "^1.15.3", "frappe-gantt": "^0.5.0", "fuse.js": "^3.4.6", diff --git a/yarn.lock b/yarn.lock index 921c174e6c..f9fbc849b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2467,10 +2467,10 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -frappe-charts@^2.0.0-rc10: - version "2.0.0-rc10" - resolved "https://registry.yarnpkg.com/frappe-charts/-/frappe-charts-2.0.0-rc10.tgz#6e4cfbb99eb48374f78c0c048e1b04f278a3848a" - integrity sha512-qj1yFdBF7e0aW6xES/SK7cb4plimcm63ENG/0HOMKprijNj0V938/v9uhe1lSATvuqu65pPkHNbt93zfCLx9gQ== +frappe-charts@^2.0.0-rc11: + version "2.0.0-rc11" + resolved "https://registry.yarnpkg.com/frappe-charts/-/frappe-charts-2.0.0-rc11.tgz#0724fa0d43593362c075c3805ebbbe1a608fcef7" + integrity sha512-DY3tThT1lNGcJlRMOtIhnILtSm5h1iKysWhZAyj7yrGiOnOWbZpYx/NZzXZYwtRrWwMlYiLX2ylV76qo31ONsg== frappe-datatable@^1.15.3: version "1.15.3"