From 6350406305f9445513b6db1d4c55e53a2dd251b2 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 20 Jun 2022 14:28:38 +0530 Subject: [PATCH] perf: remove duplicate control assets (#17237) * test: flaky tests due to uncleared filters * perf: remove duplicate code in assets Remove controls which are separately bundled too, saves ~1.1MB of network transfer. Co-authored-by: Suraj Shetty --- cypress/integration/awesome_bar.js | 1 + cypress/integration/routing.js | 4 ++++ frappe/public/js/form.bundle.js | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cypress/integration/awesome_bar.js b/cypress/integration/awesome_bar.js index e62ba6bec5..938034a34a 100644 --- a/cypress/integration/awesome_bar.js +++ b/cypress/integration/awesome_bar.js @@ -28,6 +28,7 @@ context('Awesome Bar', () => { cy.findByPlaceholderText('ID') .should('have.value', '%test%'); + cy.clear_filters(); }); it('navigates to new form', () => { diff --git a/cypress/integration/routing.js b/cypress/integration/routing.js index ad07754010..0822dd9b7d 100644 --- a/cypress/integration/routing.js +++ b/cypress/integration/routing.js @@ -16,6 +16,10 @@ describe("SPA Routing", { scrollBehavior: false }, () => { cy.go_to_list("ToDo"); }); + after(() => { + cy.clear_filters(); // avoid flake in future tests + }); + it("should apply filter on list view from route", () => { test_queries.forEach((query) => { const full_url = `${list_view}${query}`; diff --git a/frappe/public/js/form.bundle.js b/frappe/public/js/form.bundle.js index 2719535599..38d76f1f26 100644 --- a/frappe/public/js/form.bundle.js +++ b/frappe/public/js/form.bundle.js @@ -10,7 +10,6 @@ import "./frappe/form/templates/set_sharing.html"; import "./frappe/form/templates/timeline_message_box.html"; import "./frappe/form/templates/users_in_sidebar.html"; -import "./frappe/form/controls/control.js"; import "./frappe/views/formview.js"; import "./frappe/form/form.js"; import "./frappe/meta_tag.js";